Xuyuanp/scrollbar.nvim

After :enew, the scrollbar remains and cannot be cleared

delphinus opened this issue · 2 comments

  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?)

call clear when BufLeave

Cool!