From cdf98c6af9c7f91e1a89258d12135642a07c7e05 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Mon, 5 Jan 2015 22:47:04 -0500 Subject: [PATCH] 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 --- plugin/gnupg.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index 469b467..b70cb79 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -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