After writing the buffer to disk, update 'readonly'
Signed-off-by: James McCoy <vega.james@gmail.com>
This commit is contained in:
parent
1c61d3f9ed
commit
ccdf455426
@ -726,9 +726,11 @@ function s:GPGEncrypt()
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call rename(destfile, resolve(expand('<afile>')))
|
let filename = resolve(expand('<afile>'))
|
||||||
|
call rename(destfile, filename)
|
||||||
if auType == 'BufWrite'
|
if auType == 'BufWrite'
|
||||||
setl nomodified
|
setl nomodified
|
||||||
|
let &readonly = filereadable(filename) && filewritable(filename) == 0
|
||||||
endif
|
endif
|
||||||
|
|
||||||
silent exe ':doautocmd '. auType .'Post '. autocmd_filename
|
silent exe ':doautocmd '. auType .'Post '. autocmd_filename
|
||||||
|
Loading…
Reference in New Issue
Block a user