vim: Keep only one timer for checktime

Every time the file was sourced, a new timer was created.
This commit is contained in:
2024-10-25 01:13:57 +02:00
parent 12e14673bd
commit 4d93db3947

View File

@@ -7,5 +7,7 @@ if (exists('+autoread') && &autoread)
" command line window
silent! checktime
endfunc
call timer_start(1000, 'CheckTime', {'repeat': -1})
if (!exists('g:checktime_timer'))
let g:checktime_timer = timer_start(1000, 'CheckTime', {'repeat': -1})
endif
endif