[Vim-latex-cvs] vimfiles/plugin imaps.vim,1.27,1.28
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2003-02-05 04:12:31
|
Update of /cvsroot/vim-latex/vimfiles/plugin In directory sc8-pr-cvs1:/tmp/cvs-serv8937 Modified Files: imaps.vim Log Message: - Bug: imaps do not work on default win32 installations of vim because :behave mswin is set, which in turn sets &selection=inclusive. This makes IMAP_Jumpfunc() skip selecting the last character of Imap_PlaceHolderEnd. (Sumit Bhardwaj) Solution: Temporarily set &selection = exclusive in IMAP_Jumpfunc(). Index: imaps.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/plugin/imaps.vim,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** imaps.vim 9 Jan 2003 01:43:05 -0000 1.27 --- imaps.vim 5 Feb 2003 04:12:28 -0000 1.28 *************** *** 383,386 **** --- 383,391 ---- 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>" *************** *** 389,395 **** 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 --- 394,400 ---- 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 |