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
5.38k stars 177 forks source link

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

Closed willothy closed 5 months ago

willothy commented 1 year 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 11 months ago

Can confirm this fix works for me.

folke commented 5 months ago

Thanks!