weilbith / nvim-code-action-menu

Pop-up menu for code actions to show meta-information and diff preview
MIT License
577 stars 19 forks source link

Scrolloff keeps being set to 0 every time menu is opened #40

Closed cwqt closed 2 years ago

cwqt commented 2 years ago

I've set my scrolloff to 999 to ensure the cursor is always centered in the window.

https://github.com/weilbith/nvim-code-action-menu/blob/bbe43b1e3274a06520a5859cc4766f628f6c42ef/ftplugin/code-action-menu-menu.vim#L23

This line sets the scrolloff to zero every time the window is opened, so I have to reset it back each time, a bit annoying,

Can you add an CodeActionMenuWindowClosed or something so I can autocmd the scrolloff back to 999? Thanks!

Gelio commented 2 years ago

I encountered the same problem and came up with a possible fix in https://github.com/weilbith/nvim-code-action-menu/pull/43