From 48dfd5d17986a2ad3810e297242eb113a8e7c9aa Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Mon, 2 May 2022 16:31:29 +0800 Subject: [PATCH] fix(incsearch): use noautocmd to avoid incsearch_nohlsearch key --- bundle/vim-chat/autoload/chat/windows.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bundle/vim-chat/autoload/chat/windows.vim b/bundle/vim-chat/autoload/chat/windows.vim index 97e3a7697..a2c28a6de 100644 --- a/bundle/vim-chat/autoload/chat/windows.vim +++ b/bundle/vim-chat/autoload/chat/windows.vim @@ -46,14 +46,16 @@ let s:protocol = '' let s:chatting_commands = ['/set_protocol', '/set_channel'] let s:all_protocols = ['gitter'] function! chat#windows#open() abort + " "\(_incsearch-nohlsearch)" will be send to vim on CursorMoved event, + " so use noautocmd to avoid this issue if bufwinnr(s:name) < 0 if bufnr(s:name) != -1 - exe 'silent! botright split ' . '+b' . bufnr(s:name) + exe 'silent! noautocmd botright split ' . '+b' . bufnr(s:name) else - exe 'silent! botright split ' . s:name + exe 'silent! noautocmd botright split ' . s:name endif else - exec bufwinnr(s:name) . 'wincmd w' + noautocmd exec bufwinnr(s:name) . 'wincmd w' endif call s:windowsinit() call s:init_hi()