Skip to content

Fix CI failure on latest stable Neovim: jump list not updated from nofile buffer#550

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-ci-failure-neovim
Draft

Fix CI failure on latest stable Neovim: jump list not updated from nofile buffer#550
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-ci-failure-neovim

Conversation

Copilot AI commented May 4, 2026

Copy link
Copy Markdown

In newer Neovim stable, :edit executed from a nofile buffer no longer adds the current position to the jump list automatically, breaking g:fern#keepjumps_on_edit = 0 behavior.

Changes

  • autoload/fern/internal/buffer.vim: When opener='edit' and keepjumps=0, explicitly record the current position via normal! m' (sets previous context mark → adds to jump list) before executing the edit command. Always apply the keepjumps modifier to prevent double-add:
    • keepjumps=0: position recorded by m', keepjumps edit prevents duplicate
    • keepjumps=1: no m', keepjumps edit intentionally skips recording
" Before
if options.keepjumps && options.opener ==# 'edit'
  let options.mods .= ' keepjumps'
endif

" After
if options.opener ==# 'edit'
  if !options.keepjumps
    execute "normal! m'"  " explicitly record position; :edit no longer does this in newer Neovim
  endif
  let options.mods .= ' keepjumps'  " always prevent :edit from double-adding
endif
  • test/behavior/jumplist.vimspec: Removed comments misattributing the jump count difference to -wait side effects (the actual cause was G on nofile adding one entry, and edit adding another — the latter now handled explicitly via m').

Copilot AI linked an issue May 4, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits May 4, 2026 03:24
Copilot AI changed the title [WIP] Fix CI failures on the latest stable Neovim Fix CI failure on latest stable Neovim: jump list not updated from nofile buffer May 4, 2026
Copilot AI requested a review from lambdalisue May 4, 2026 03:26
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.

CI fails on the latest stable Neovim

2 participants