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

set local instead of global ones in code actions window #43

Closed Gelio closed 2 years ago

Gelio commented 2 years ago

Use setlocal instead of set to set vim options inside of the code-actions buffer.

This prevents overriding users global options and only applies the options inside the code-actions buffer.

To reproduce the problem:

  1. :set scrolloff=5
  2. Open the code-actions window
  3. Close the code-actions window
  4. :verbose set scrolloff?

On main it says:

  scrolloff=0
        Last set from ~/.local/share/nvim/site/pack/packer/opt/nvim-code-action-menu/ftplugin/code-action-menu-menu.vim line 23

With this fix:

  scrolloff=5

Fixes https://github.com/weilbith/nvim-code-action-menu/issues/40

weilbith commented 2 years ago

Thank you! 🤗

Gelio commented 2 years ago

Awesome, thanks for merging it so fast! :rocket: