From c411e61aeb0efc232d89f81481520c1f5fe8355e Mon Sep 17 00:00:00 2001 From: James McCoy Date: Sun, 22 Oct 2017 23:21:58 -0400 Subject: [PATCH] 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 --- plugin/gnupg.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index 568b637..ae3005b 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -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