Skip to content

Commit

Permalink
Manually set [ and ] marks after decrypting
Browse files Browse the repository at this point in the history
: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>
  • Loading branch information
jamessan committed Jan 6, 2015
1 parent 30a4987 commit cdf98c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugin/gnupg.vim
Expand Up @@ -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
Expand Down

0 comments on commit cdf98c6

Please sign in to comment.