handle &sel of 'exclusive' in split annotation
authorIngo Karkat <ingo@karkat.de>
Sat, 30 Jul 2011 13:19:49 +0000 (30 15:19 +0200)
committerBob Hiestand <bob.hiestand@gmail.com>
Mon, 3 Oct 2011 18:54:38 +0000 (3 13:54 -0500)
plugin/vcscommand.vim

index 2698322..1ea79b6 100644 (file)
@@ -820,7 +820,15 @@ function! s:VCSAnnotate(bang, ...)
                        endif
                        let originalFileType = getbufvar(originalBuffer, '&ft')
                        let annotateFileType = getbufvar(annotateBuffer, '&ft')
-                       execute "normal! 0zR\<c-v>G/" . splitRegex . "/e\<cr>d"
+
+                       let saveselection = &selection
+                       set selection=inclusive
+                       try
+                               execute "normal! 0zR\<c-v>G/" . splitRegex . "/e\<cr>d"
+                       finally
+                               let &selection = saveselection
+                       endtry
+
                        call setbufvar('%', '&filetype', getbufvar(originalBuffer, '&filetype'))
                        set scrollbind
                        leftabove vert new