From e4b2ba38ce816aadb067d1c76561d8fe2b23394d Mon Sep 17 00:00:00 2001 From: srdusr Date: Thu, 31 Aug 2023 11:01:31 +0200 Subject: Fix to annoying timestamp issue on write (The file has been changed since reading it...) --- autoload/utils.vim | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/autoload/utils.vim b/autoload/utils.vim index fc078f7..3bb83bf 100644 --- a/autoload/utils.vim +++ b/autoload/utils.vim @@ -163,4 +163,17 @@ endfu autocmd! BufNewFile,BufRead *.* call utils#DisableBr() +"------------------------------------------------- + +" Annoying timestamp issue on write (The file has been changed since reading it...) +function! utils#ProcessFileChangedShell() + if v:fcs_reason == 'mode' || v:fcs_reason == 'time' + let v:fcs_choice = '' + else + let v:fcs_choice = 'ask' + endif +endfunction +autocmd FileChangedShell call utils#ProcessFileChangedShell() + + "------------------------------------------------- -- cgit v1.2.3