[Vim-latex-cvs] vimfiles/plugin remoteOpen.vim,1.2,1.3
Brought to you by:
srinathava,
tmaas
From: <sri...@us...> - 2004-02-29 07:36:26
|
Update of /cvsroot/vim-latex/vimfiles/plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4223 Modified Files: remoteOpen.vim Log Message: Bug: Opening a file via the :RemoteOpen command does not work (Xin Yin) Why: Vim eats up all but the last remote_send call when multiple invokations to this function are made (Vim bug) Fix: Collapse the entire set of keys into a single string and make a single remote_send call. Index: remoteOpen.vim =================================================================== RCS file: /cvsroot/vim-latex/vimfiles/plugin/remoteOpen.vim,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** remoteOpen.vim 14 Jun 2003 04:43:07 -0000 1.2 --- remoteOpen.vim 29 Feb 2004 07:26:22 -0000 1.3 *************** *** 50,57 **** --- 50,59 ---- let filename = matchstr(a:arglist, '^\s*\zs.*\ze') endif + call Tex_Debug("linenum = ".linenum.', filename = '.filename, "ropen") " If there is no clientserver functionality, then just open in the present " session and return if !has('clientserver') + call Tex_Debug("-clientserver, opening locally and returning", "ropen") exec "e ".filename exec linenum *************** *** 64,67 **** --- 66,70 ---- " If there are no servers, open file locally. if servers == '' + call Tex_Debug("no open servers, opening locally", "ropen") exec "e ".filename exec linenum *************** *** 90,95 **** " set a variable g:Remote_Server to indicate that this server " session has at least one file opened via RemoteOpen ! call remote_send(server, "\<C-\>\<C-n>:drop ".filename."\<CR>:".linenum."\<CR>:normal! zv\<CR>") ! call remote_send(server, ":let g:Remote_Server = 1\<CR>") call remote_foreground(server) " quit this vim session --- 93,102 ---- " set a variable g:Remote_Server to indicate that this server " session has at least one file opened via RemoteOpen ! call remote_send(server, ! \ "\<C-\>\<C-n>". ! \ ":let g:Remote_Server = 1\<CR>". ! \ ":drop ".filename."\<CR>". ! \ ":".linenum."\<CR>zv" ! \ ) call remote_foreground(server) " quit this vim session *************** *** 102,105 **** --- 109,113 ---- let server = s:Strntok(servers, "\n", i) endwhile + call Tex_Debug("no server has file open, but firstServer = ".firstServer, "ropen") " If none of the servers have the file open, then open this file in the *************** *** 107,112 **** " multiple vims, then at least they will all be opened by the same gvim " server. ! call remote_send(firstServer, "\<C-\>\<C-n>:drop ".filename."\<CR>:".linenum."\<CR>:normal! zv\<CR>") ! call remote_send(firstServer, ":let g:Remote_Server = 1\<CR>") call remote_foreground(firstServer) " quit this vim session --- 115,124 ---- " multiple vims, then at least they will all be opened by the same gvim " server. ! call remote_send(firstServer, ! \ "\<C-\>\<C-n>". ! \ ":let g:Remote_Server = 1\<CR>". ! \ ":drop ".filename."\<CR>". ! \ ":".linenum."\<CR>zv" ! \ ) call remote_foreground(firstServer) " quit this vim session |