Skip to content

Commit e847ecc

Browse files
committed
Do not trigger autocmds when scrolling nvim popups
1 parent 257964f commit e847ecc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

autoload/OmniSharp/popup.vim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,11 @@ endfunction
225225
" Neovim scrolling works by giving focus to the popup and running normal-mode
226226
" commands
227227
function! s:NvimPopupNormal(commands)
228-
call nvim_set_current_win(s:lastwinid)
228+
" Ensure that the OmniSharp_popup_close autocmds are not triggered to close
229+
" the floating window before scrolling
230+
noautocmd call nvim_set_current_win(s:lastwinid)
229231
execute 'normal!' eval(printf('"\<C-%s>"', a:commands))
230-
call nvim_set_current_win(s:parentwinid)
232+
noautocmd call nvim_set_current_win(s:parentwinid)
231233
endfunction
232234

233235
" Editing buffers is not allowed from <expr> mappings. The popup mappings are

0 commit comments

Comments
 (0)