Skip to content

Commit

Permalink
Apply hide_on_cursor_intersect in insert mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed Jan 21, 2025
1 parent 9570825 commit e8ad0e0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/scrollview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1434,7 +1434,7 @@ local show_scrollbar = function(winid, bar_winid)
local augroup = api.nvim_create_augroup('scrollview_cursor_intersect', {
clear = true
})
api.nvim_create_autocmd('CursorMoved', {
api.nvim_create_autocmd({'CursorMoved', 'CursorMovedI'}, {
group = augroup,
callback = function()
require('scrollview').refresh()
Expand Down Expand Up @@ -1790,7 +1790,7 @@ local show_signs = function(winid, sign_winids, bar_winid)
local augroup = api.nvim_create_augroup('scrollview_cursor_intersect', {
clear = true
})
api.nvim_create_autocmd('CursorMoved', {
api.nvim_create_autocmd({'CursorMoved', 'CursorMovedI'}, {
group = augroup,
callback = function()
require('scrollview').refresh()
Expand Down Expand Up @@ -2577,7 +2577,7 @@ local enable = function()
" Refresh bars if the cursor intersects a scrollview window (and the
" corresponding option is set). We check for Neovim 0.7 since this
" functionality utilizes the Neovim autocmd API.
autocmd CursorMoved *
autocmd CursorMoved,CursorMovedI *
\ if g:scrollview_hide_on_cursor_intersect
\ && has('nvim-0.7')
\ && luaeval('require("scrollview").cursor_intersects_scrollview()')
Expand Down

0 comments on commit e8ad0e0

Please sign in to comment.