Update of /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite
In directory sc8-pr-cvs1:/tmp/cvs-serv22175
Modified Files:
envmacros.vim
Log Message:
Bug: When some text is visually selected, then <F7> surrounds the selection
in an environment created from the last word of the selection instead
of prompting for an environment.
Why: Tex_DoCommand ignores the value of s:isvisual.
Fix: Make Tex_DoCommand honor s:isvisual.
Index: envmacros.vim
===================================================================
RCS file: /cvsroot/vim-latex/vimfiles/ftplugin/latex-suite/envmacros.vim,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -d -r1.41 -r1.42
*** envmacros.vim 14 Dec 2003 07:17:58 -0000 1.41
--- envmacros.vim 23 Dec 2003 21:08:42 -0000 1.42
***************
*** 939,943 ****
function! Tex_DoCommand(...)
if a:0 < 1
! if getline('.') != ''
let lastword = expand('<cword>')
if lastword != ''
--- 939,952 ----
function! Tex_DoCommand(...)
if a:0 < 1
! " If the current line is empty or if a visual selection has been made,
! " prompt for a new environment.
! if getline('.') == '' || (exists('s:isvisual') && s:isvisual == 'yes')
! let com = PromptForCommand('Choose a command to insert: ')
! if com != ''
! return Tex_PutCommand(com)
! else
! return ''
! endif
! else
let lastword = expand('<cword>')
if lastword != ''
***************
*** 945,954 ****
endif
endif
- let com = PromptForCommand('Choose a command to insert: ')
- if com != ''
- return Tex_PutCommand(com)
- else
- return ''
- endif
else
return Tex_PutCommand(a:1)
--- 954,957 ----
***************
*** 1057,1061 ****
function! s:ChangeCommand(newcom)
! exe 'normal ct{'.a:newcom."\<Esc>"
endfunction
--- 1060,1064 ----
function! s:ChangeCommand(newcom)
! exe 'normal! ct{'.a:newcom."\<Esc>"
endfunction
|