folke / which-key.nvim

💥 Create key bindings that stick. WhichKey helps you remember your Neovim keymaps, by showing available keybindings in a popup as you type.
Apache License 2.0
4.99k stars 160 forks source link

fix(scroll): restore win view after rendering buffer #516

Closed willothy closed 2 months ago

willothy commented 10 months ago

problem: as of neovim/neovim#24824 buf_set_lines adjusts topline differently, which breaks scrolling in the which-key menu. See the discussion in that PR for more info. solution: save and restore view when rendering to ensure that the render does not change scroll position.

fixes #515

mrcjkb commented 8 months ago

Can confirm this fix works for me.

folke commented 2 months ago

Thanks!