aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2021-07-24 13:11:24 +0800
committerjdhao <jdhao@hotmail.com>2021-07-24 13:11:24 +0800
commitb0eb7c4508599a7eace480d89e764612664839a3 (patch)
tree3953f666c978477b12b11f450f77a9eefba775bc /core
parentedd74337a9c851673da4a04bdc8c145d26c30a6b (diff)
Simplify file reload logic
Diffstat (limited to 'core')
-rw-r--r--core/autocommands.vim3
1 files changed, 1 insertions, 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