Skip to content

Commit

Permalink
Refresh scrollview when changing number, relativenumber, or signcolumn.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed Jul 11, 2023
1 parent 1c559f4 commit cd7492e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/scrollview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1983,6 +1983,11 @@ local enable = function()
" Scrollbar positions can become stale after adding or removing winbars.
autocmd OptionSet winbar :lua require('scrollview').refresh_bars_async()
" Scrollbar positions can become stale when the number column or sign
" column is added or removed (when scrollview_base=buffer).
autocmd OptionSet number,relativenumber,signcolumn
\ :lua require('scrollview').refresh_bars_async()
augroup END
]])
-- The initial refresh is asynchronous, since :ScrollViewEnable can be used
Expand Down

0 comments on commit cd7492e

Please sign in to comment.