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:
parent
d3453145c5
commit
c411e61aeb
@ -761,7 +761,9 @@ function s:GPGEncrypt()
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if auType == 'BufWrite'
|
if auType == 'BufWrite'
|
||||||
setl nomodified
|
if expand('%:p') == filename
|
||||||
|
setl nomodified
|
||||||
|
endif
|
||||||
setl buftype=acwrite
|
setl buftype=acwrite
|
||||||
let &readonly = filereadable(filename) && filewritable(filename) == 0
|
let &readonly = filereadable(filename) && filewritable(filename) == 0
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user