Xuyuanp / scrollbar.nvim

scrollbar for neovim
Apache License 2.0
269 stars 10 forks source link

After :enew, the scrollbar remains and cannot be cleared #14

Closed delphinus closed 4 years ago

delphinus commented 4 years ago
  1. open some file. :e ~/.config/nvim/init.vim
    • Now you can see the scrollbar moving.
  2. :enew
    • The scrollbar still remains but does not work.

:enew makes a new buffer and clear all buffer variables. So b:scrollbar_state already disappeared and this plugin cannot access the window ID of the existent scrollbar.

What can I do for this? (can remove lone scrollbars after :enew?)

Xuyuanp commented 4 years ago

call clear when BufLeave

delphinus commented 4 years ago

Cool!