vim:funcs: Silence checktime call

The checktime command is not available in the command line window. As
the `CheckTime` function runs every second, the command line window
spits out an error message every second making it practically unusable.

This patch silences the `checktime` call to fix this.
This commit is contained in:
2022-04-24 15:01:28 +02:00
parent 846d0fc6c6
commit 4b421f6b78

View File

@@ -11,7 +11,9 @@ endfunction
" Check time every second to read file changes. " Check time every second to read file changes.
if (exists('+autoread') && &autoread) if (exists('+autoread') && &autoread)
function! CheckTime(timer) function! CheckTime(timer)
checktime " NOTE: silent the checktime call as it is an invalid command in the
" command line window
silent! checktime
endfunc endfunc
execute timer_start(1000, 'CheckTime', {'repeat': -1}) execute timer_start(1000, 'CheckTime', {'repeat': -1})
endif endif