From b0eb7c4508599a7eace480d89e764612664839a3 Mon Sep 17 00:00:00 2001 From: jdhao Date: Sat, 24 Jul 2021 13:11:24 +0800 Subject: [PATCH] Simplify file reload logic --- core/autocommands.vim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/autocommands.vim b/core/autocommands.vim index e88a1db..29b4cea 100644 --- a/core/autocommands.vim +++ b/core/autocommands.vim @@ -42,10 +42,9 @@ augroup END " https://vi.stackexchange.com/a/20397/15292. augroup auto_read autocmd! - autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * - \ if mode() == 'n' && getcmdwintype() == '' | checktime | endif autocmd FileChangedShellPost * echohl WarningMsg \ | echo "File changed on disk. Buffer reloaded!" | echohl None + autocmd FocusGained,CursorHold * if getcmdwintype() == '' | checktime | endif augroup END augroup numbertoggle