[Vim-latex-cvs] vimfiles/plugin imaps.vim,1.31,1.32
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2003-06-19 01:21:36
|
Update of /cvsroot/vim-latex/vimfiles/plugin In directory sc8-pr-cvs1:/tmp/cvs-serv9593 Modified Files: imaps.vim Log Message: Bug: IMAP_Jumpfunc() and VEnclose() do not work with &selection = 'exclusive' (Jannie Hofmeyr, Pierre Antoine Champin) Fix: Select one more character in 'exclusive' mode. (suggested by Pierre Antoine Champin). Index: imaps.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/plugin/imaps.vim,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** imaps.vim 25 Mar 2003 19:11:40 -0000 1.31 --- imaps.vim 19 Jun 2003 01:21:33 -0000 1.32 *************** *** 8,12 **** " while preserving filetype indentation. " ! " $Header$ " " Documentation: {{{ --- 8,12 ---- " while preserving filetype indentation. " ! " $Id$ " " Documentation: {{{ *************** *** 418,435 **** let placeHolderEmpty = !strlen(template) ! " Jumping doesn't work with exclusive ! let _selection = &selection ! let &selection = 'inclusive' ! let restoreselection = "let &selection = '"._selection."'" " Select till the end placeholder character. ! let movement = "\<C-o>v/\\V".pheUser."/e\<CR>" " Now either goto insert mode or select mode. if placeHolderEmpty && g:Imap_DeleteEmptyPlaceHolders " delete the empty placeholder into the blackhole. ! return movement."\"_c\<C-o>:".s:RemoveLastHistoryItem."|".restoreselection."\<CR>" else ! return movement."\<C-\>\<C-N>:".s:RemoveLastHistoryItem."|".restoreselection."\<CR>gv\<C-g>" endif --- 418,437 ---- let placeHolderEmpty = !strlen(template) ! " If we are selecting in exclusive mode, then we need to move one step to ! " the right ! let extramove = '' ! if &selection == 'exclusive' ! let extramove = 'l' ! endif " Select till the end placeholder character. ! let movement = "\<C-o>v/\\V".pheUser."/e\<CR>".extramove " Now either goto insert mode or select mode. if placeHolderEmpty && g:Imap_DeleteEmptyPlaceHolders " delete the empty placeholder into the blackhole. ! return movement."\"_c\<C-o>:".s:RemoveLastHistoryItem."\<CR>" else ! return movement."\<C-\>\<C-N>:".s:RemoveLastHistoryItem."\<CR>gv\<C-g>" endif *************** *** 512,518 **** endif let normcmd = normcmd. ! \a:vstart."!!mark!!".a:vend.newline. ! \"\<C-\>\<C-N>?!!mark!!\<CR>v7l\"_s\<C-r>r\<C-\>\<C-n>" " this little if statement is because till very recently, vim used to --- 514,526 ---- endif + " In exclusive selection, we need to select an extra character. + if &selection == 'exclusive' + let movement = 8 + else + let movement = 7 + endif let normcmd = normcmd. ! \ a:vstart."!!mark!!".a:vend.newline. ! \ "\<C-\>\<C-N>?!!mark!!\<CR>v".movement."l\"_s\<C-r>r\<C-\>\<C-n>" " this little if statement is because till very recently, vim used to |