hedyhli / outline.nvim

Code outline sidebar powered by LSP. Significantly enhanced & refactored fork of symbols-outline.nvim.
https://sr.ht/~hedy/outline.nvim
MIT License
580 stars 17 forks source link

Outline window forcibly jumps up while scrolling #7

Closed z3z1ma closed 10 months ago

z3z1ma commented 10 months ago

The window keeps forcibly jumping to seemingly arbitrary symbols so often that I cannot scroll the the bottom of the window Even using G to go to the bottom, it jumps back up to an arbitrary node.

The only thing I see before it happens are some nodes have highlights like below and the window jumps up. Is there any codepath that would cause forced scrolling to nodes? While just pressing j/k in the outline window?

image
z3z1ma commented 10 months ago

Tried it in python file too

Same thing. I was at the very bottom of the outline window after pressing G and with no other keypress it just jumps back up by itself to these nodes. Mind that my cursor is not at these nodes.

image
gennaro-tedesco commented 10 months ago

I confirm seeing this too (in lua, go, python and rust at least).

hedyhli commented 10 months ago

This is definitely an annoyance, thanks for reporting.

I believe it is now fixed, but do let me know if it is otherwise.

It will not update the outline items nor cursor position when cursor is in outline window, however you can use <C-g> when in the outline window to do so manually (or :OutlineFollow[!] from code window).

hedyhli commented 10 months ago

Mind that my cursor is not at these nodes.

This is currently a known issue that is observed only seldomly for me, it will be tracked here: #1