mirror of
https://github.com/Ascyii/vim-gnupg.git
synced 2026-01-01 06:14:24 -05:00
Manually set [ and ] marks after decrypting
:lockmarks doesn't appear to preserve these marks. They would need to be adjusted anyway due to the line numbers changing, so just set the marks to the start/end of the buffer. Signed-off-by: James McCoy <vega.james@gmail.com>
This commit is contained in:
@@ -565,7 +565,11 @@ function s:GPGBufReadPost()
|
||||
" command)
|
||||
let levels = &undolevels
|
||||
set undolevels=-1
|
||||
" :lockmarks doesn't actually prevent '[,'] from being overwritten, so we
|
||||
" need to manually set them ourselves instead
|
||||
silent 1delete
|
||||
1mark [
|
||||
$mark ]
|
||||
let &undolevels = levels
|
||||
" Allow the user to define actions for GnuPG buffers
|
||||
silent doautocmd User GnuPG
|
||||
|
||||
Reference in New Issue
Block a user