A small release to wrap up the v0.10 series before moving on to v0.11.
You can now resize the preview from Lua, abandon now works the same way as jj abandon, and there are a few bookmark fixes.
Improvements
Set the preview size from Lua
ui.preview has two new functions: set_size(percent) sets how much space the preview takes, and size() returns the current size. set_size opens the preview if it is hidden and keeps focus on the revisions list. It also accepts 100, which lets the preview take the full screen. Expanding the preview or dragging the separator still stops before that point.
For example, this binds alt+p to toggle a full-screen preview:
[[actions]]
name = "toggle preview full size"
lua = '''
if jjui.ui.preview.size() == 100 then
jjui.ui.preview.set_size(50)
else
jjui.ui.preview.set_size(100)
end
'''
key = "alt+p"
scope = "ui"
desc = "Toggle preview full size"(#776)
Wider help view
The help view can now grow to 120 columns, up from 90. Entries no longer have (when ...) conditions appended to them. Bindings that don't apply to the current selection are still struck through.
Fixes
Rename bookmarks with spaces
The bookmark pane's rename prompt now replaces spaces with hyphens, the same way the set bookmark prompt does. Before, a name with spaces made jj bookmark rename fail.
(#779)
Filter bookmark items by the exact remote
When you pick a remote in the bookmarks menu, it now lists only that remote's track/untrack items. Before, it matched remote names as substrings, so with remotes up and upstream, picking up also listed track 'feature@upstream'.
(#787)
Notes
Abandon now deletes bookmarks
Abandon now behaves like jj abandon and deletes bookmarks on the abandoned revisions. Before, jjui passed --retain-bookmarks, which moved them to the parent. To get the old behaviour back, add this to config.toml:
[revisions.abandon]
retain_bookmarks = true(#783)
What's Changed
- fix: Make abandon command behave the same as jj abandon by @dnnr in #783
- fix(bookmarkpane): replace spaces with hyphens when renaming a bookmark by @aliassar in #779
- fix(bookmarks): match the selected remote exactly when filtering by @aliassar in #787
New Contributors
Full Changelog: v0.10.13...v0.10.14