[Vim-latex-cvs] vimfiles/plugin imaps.vim,1.29,1.30
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2003-03-25 08:20:20
|
Update of /cvsroot/vim-latex/vimfiles/plugin In directory sc8-pr-cvs1:/tmp/cvs-serv8363 Modified Files: imaps.vim Log Message: Bug: Incorrect detection of abbreviations. If there was (were) abbreviations starting with the letter 'a', then typing 'a<space>' would trigger an expansion. Cause: The :iab command also echoes for partial completions. Solution: Check more thoroughly whether a word is an abbreviation LHS or not. Index: imaps.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/plugin/imaps.vim,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** imaps.vim 5 Feb 2003 23:29:04 -0000 1.29 --- imaps.vim 25 Mar 2003 08:20:11 -0000 1.30 *************** *** 235,243 **** " doesn't have the equivalent of the :mapcheck() function for " abbreviations. exec "redir @a | silent! iab ".lastword." | redir END" ! if @a =~ "No abbreviation found" return a:char endif ! let abbreviationRHS = matchstr(@a, "\n".'i\s\+\k\+\s\+@\?\zs.*') let abbreviationRHS = escape(abbreviationRHS, '<') exec 'let abbreviationRHS = "'.abbreviationRHS.'"' --- 235,248 ---- " doesn't have the equivalent of the :mapcheck() function for " abbreviations. + let _a = @a exec "redir @a | silent! iab ".lastword." | redir END" ! let abbreviationRHS = matchstr(@a."\n", "\n".'i\s\+'.lastword.'\+\s\+@\?\zs.*\ze'."\n") ! ! if @a =~ "No abbreviation found" || abbreviationRHS == "" ! let @a = _a return a:char endif ! ! let @a = _a let abbreviationRHS = escape(abbreviationRHS, '<') exec 'let abbreviationRHS = "'.abbreviationRHS.'"' |