Skip to content

fix(navigation): preserve jumplist before output buffer jumps#456

Merged
sudo-tee merged 1 commit into
sudo-tee:mainfrom
phanen:fix/save-jumplist
Jul 9, 2026
Merged

fix(navigation): preserve jumplist before output buffer jumps#456
sudo-tee merged 1 commit into
sudo-tee:mainfrom
phanen:fix/save-jumplist

Conversation

@phanen

@phanen phanen commented Jul 9, 2026

Copy link
Copy Markdown
Contributor
Problem: programmatic cursor moves via nvim_win_set_cursor in the
output window (gg, ]], [[, ]u, [u, <CR>, ...) do not update the
previous-position mark, so users cannot return to the prior output
location with `` or <C-o> after a jump.

Solution: introduce mark_jump_position() which records the current
cursor as the ' mark inside the source window via
`noau normal! m'`, and call it before every nvim_win_set_cursor in
navigation.lua and before the gg keymap in output_window.lua.

Problem: programmatic cursor moves via nvim_win_set_cursor in the
output window (gg, ]], [[, ]u, [u, <CR>, ...) do not update the
previous-position mark, so users cannot return to the prior output
location with `` or <C-o> after a jump.

Solution: introduce mark_jump_position() which records the current
cursor as the ' mark inside the source window via
`noau normal! m'`, and call it before every nvim_win_set_cursor in
navigation.lua and before the gg keymap in output_window.lua.
@sudo-tee

sudo-tee commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Thanks for the PR.

This is another great QOL improvement

@sudo-tee sudo-tee merged commit 556c8c8 into sudo-tee:main Jul 9, 2026
5 checks passed
@phanen

phanen commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

@sudo-tee

sudo-tee commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Yes, it's always the same MacOs test that times out.. I will investigate

@sudo-tee

sudo-tee commented Jul 9, 2026

Copy link
Copy Markdown
Owner

I pushed a fix, to use a fake timer instead of relying on vim.wait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants