[Vim-latex-cvs] vimfiles/plugin imaps.vim,1.32,1.33
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2003-09-06 20:07:28
|
Update of /cvsroot/vim-latex/vimfiles/plugin In directory sc8-pr-cvs1:/tmp/cvs-serv12803 Modified Files: imaps.vim Log Message: Bug: @/ would sometimes change from its previous value when using IMAP_Jumpfunc(). Why: s:RemoveLastHistoryItem sets @/ to the last search item in the @/ history, but @/ is not necessarily always the last item in the @/ history. Fix: Remember @/ in Tex_LastSearchPattern and then restore it. Index: imaps.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/plugin/imaps.vim,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** imaps.vim 19 Jun 2003 01:21:33 -0000 1.32 --- imaps.vim 6 Sep 2003 20:07:25 -0000 1.33 *************** *** 428,431 **** --- 428,435 ---- let movement = "\<C-o>v/\\V".pheUser."/e\<CR>".extramove + " First remember what the search pattern was. s:RemoveLastHistoryItem will + " reset @/ to this pattern so we do not create new highlighting. + let g:Tex_LastSearchPattern = @/ + " Now either goto insert mode or select mode. if placeHolderEmpty && g:Imap_DeleteEmptyPlaceHolders *************** *** 541,544 **** --- 545,552 ---- let normcmd = normcmd."`<v".len."l\<C-\>\<C-N>" + " First remember what the search pattern was. s:RemoveLastHistoryItem + " will reset @/ to this pattern so we do not create new highlighting. + let g:Tex_LastSearchPattern = @/ + silent! exe normcmd " this is to restore the r register. *************** *** 632,636 **** " s:RemoveLastHistoryItem: removes last search item from search history {{{ " Description: Execute this string to clean up the search history. ! let s:RemoveLastHistoryItem = ':call histdel("/", -1)|let @/=histget("/", -1)' " }}} --- 640,644 ---- " s:RemoveLastHistoryItem: removes last search item from search history {{{ " Description: Execute this string to clean up the search history. ! let s:RemoveLastHistoryItem = ':call histdel("/", -1)|let @/=Tex_LastSearchPattern' " }}} |