Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E19 when jumping back to fern buffer in nvim #510

Open
tomtomjhj opened this issue Oct 20, 2024 · 2 comments
Open

E19 when jumping back to fern buffer in nvim #510

tomtomjhj opened this issue Oct 20, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@tomtomjhj
Copy link
Contributor

  1. In vim-fern directory, run nvim (0.10.2) as follows:
    nvim --clean --cmd 'set rtp^=.' -c 'Fern .'
    
  2. Move the cursor to README.md, and <CR> on it.
  3. Jump back to the fern buffer with <C-o>.
  4. Jump to README.md with <C-i>
  5. Jump back to the fern buffer with <C-o>
  6. E19: Mark has invalid line number

Interestingly, the line number of the position in jumplist keeps increasing after each <C-o>, <C-i> cycle:

# In README.md

:ju
 jump line  col file/text
   2     1    0 fern://79154091/file:///home/user/.vim/plugged/vim-fern$
   1    41    0 fern://79154091/file:///home/user/.vim/plugged/vim-fern$
>  0     1    0 # 🌿 vim-fern

# run <C-o> <C-i>

:ju
 jump line  col file/text
   2     1    0 fern://79154091/file:///home/user/.vim/plugged/vim-fern$
   1    49    0 fern://79154091/file:///home/user/.vim/plugged/vim-fern$

Vim (9.1.771) does not raise E19, but you can see the line number increasing after each <C-o>, <C-i>.

@lambdalisue lambdalisue added the bug Something isn't working label Oct 20, 2024
@lambdalisue
Copy link
Owner

Reproduced.

@lambdalisue
Copy link
Owner

setlocal buftype=nofile bufhidden=unload

Using bufhidden=hide solve the issue but I'm not sure if it should.

lambdalisue added a commit that referenced this issue Oct 20, 2024
Let users decide whether to set `hidden` or not.

Close #510
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants