mirror of
https://github.com/Ascyii/vim-gnupg.git
synced 2026-01-01 06:14:24 -05:00
On save, only unset 'modified' for the current filename
If the buffer is being saved to a different filename, then this buffer should still be modified as its backing file is still different than the buffer. Signed-off-by: James McCoy <jamessan@jamessan.com>
This commit is contained in:
@@ -761,7 +761,9 @@ function s:GPGEncrypt()
|
||||
endif
|
||||
|
||||
if auType == 'BufWrite'
|
||||
setl nomodified
|
||||
if expand('%:p') == filename
|
||||
setl nomodified
|
||||
endif
|
||||
setl buftype=acwrite
|
||||
let &readonly = filereadable(filename) && filewritable(filename) == 0
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user