- Squash: behaves like rebase, the user can select 1 or more
revisions to squash and then a destination
- Quick squash: `-r {rev} -u --ignore-immutable` flag from jj allowing
for quick visuall squashes
parsed as change-lines.
- Added some tests to avoid these false positives
- Forced the parser to ensure there is at least a symbol in the
change line allowed_prefixes before finding out the change
Changes add support for rebasing while ignoring immutability constraints with new keymaps (<S-CR>, <S-o>, <S-a>, <S-b>) and update documentation. Refactors rebase handler to accept optional ignore_immut parameter and includes minor comment improvements in buffer and command modules.
Now it is possible to rebase interactively from the log buffer with visual feedback. You can rebase one or many visually selected changes.
Supported target modes are: `-o` / `-A` / `-B`.
Limitation:
- As of now you cannot rebase a whole branch (-b) from the log view.
Bonus from this pr:
- Now keymaps support different modes
- Add `prefix` option to `bookmark_create()` function for setting default bookmark names
- Add `bookmark.prefix` configuration option for global bookmark prefix defaults
- Update README with bookmark prefix usage examples
When closing a terminal buffer (floating or regular), a race condition
could occur where the BufWipeout/BufDelete autocmd clears the buffer
reference, but the job's on_exit handler later tries to operate on it
via vim.schedule. This caused 'Invalid buffer' errors.
Add validity checks in both floating and regular buffer on_exit
handlers to safely handle the case where the buffer has already been
cleaned up.
Convert blocking jj commands to async using vim.fn.jobstart() to prevent UI
freezing during fetch, push, rebase, squash, and other heavy operations.
Changes:
- Implement execute_command_async() in runner with proper error handling
- Captures stdout from job and passes to success callback
- Supports stdin input for commands that require it
- Includes silent flag to suppress error notifications
- Replicates sync version's error handling behavior
- Convert blocking operations to async:
- handle_log_fetch, handle_log_push_all, handle_log_new
- handle_log_edit, handle_log_abandon, handle_log_describe
- describe.execute_describe, all init.lua commands
- Add push/fetch as public commands with CLI support:
- M.fetch() - fetch from remote
- M.push(opts) - push all changes or specific bookmark
- CLI: :J push, :J push <bookmark>, :J fetch
- Implement handle_log_push_bookmark() for revision under cursor:
- Retrieves and strips modified bookmark indicator (*)
- Pushes specific bookmark to remote
- Keybind: Shift+p in log buffer
- Update README with new keybinds:
- a: abandon revision under cursor
- f: fetch from remote
- p: push all changes
- Shift+p: push revision's bookmark
- Add Lua API docs for push command options
- Add close_on_edit option to close log buffer after editing a change (default: false)
- Rename handle_log_enter to handle_log_edit with close_on_exit parameter
- Update log keymaps to pass close_on_edit config to handlers
- Update config types and defaults in init.lua
Add cursor position restoration with configurable timing to handle terminal
buffer rendering asynchronously. This fixes cursor column being reset to 0
when refreshing jj log commands.
Changes:
- Add `terminal.cursor_render_delay` configuration option (default: 10ms)
- Add buffer.get_cursor() and buffer.set_cursor() helpers in core/buffer
* buffer.set_cursor() uses defer_fn with configurable delay for terminal buffers
* Automatic position validation with clamping to buffer bounds
* Line number clamped to [1, line_count]
* Column clamped to [0, line_length] based on actual line content
* Validation happens inside deferred callback to check against final rendered content
- Extract clamp_cursor_position() helper to eliminate code duplication
- Refactor terminal module to use new buffer cursor helpers
- Store and restore cursor position when cycling through log commands
- Update README with terminal configuration section and example usage
The delay is necessary because nvim_open_term() + nvim_chan_send() have
asynchronous rendering in the terminal emulator layer. Setting the cursor
before rendering completes results in the column being reset to 0. Users
experiencing issues can increase the delay value if needed.
- Document describe.editor configuration for type and keymaps
- Document keymaps configuration for log, status, and close keybindings
- Update examples to show the new nested config structure
- Add section on customizing describe editor keymaps
- Preserve multiline descriptions in describe editor buffer
- Close terminal buffer before opening describe editor
- Capture log state before closing to detect if we should reopen
- Add on_unload callback to editor to handle log reopening
- Suppress redraws during buffer transitions with lazyredraw
- Remove duplicate hardcoded status keymaps from terminal.lua (were referencing undefined functions)
- Fix resolve_keymaps_from_specs to validate handlers exist before creating keymaps
- Add M.setup() to cmd module for configuration
- Move describe editor config to M.config.describe.editor with nested structure
- Add keymaps config with separate log, status, and close sections
- Implement resolve_keymaps_from_specs() helper to build keymap lists from config
- Extract editor.open_editor() keymaps parameter support
- Move status/log event handlers from terminal.lua to cmd.lua
- Convert log/status buffer keymaps to config-driven approach with handler specs
- Replace nested if/elseif chains with dispatch table for cleaner pattern matching
- Store remaining_args_str to avoid repeated table.concat() calls
- Simplify whitespace trimming using vim.trim() instead of gsub patterns
- Add state.buf_cmd tracking to store subcommand on successful execution for conditional UI refreshes
- Clean up state on buffer close and execution failure
- Add conditional log refresh for squash(), undo(), and redo() when log buffer is active
- Fix type annotations for nil handling