[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim-dev
Subject:    Patch 6.3b.017
From:       Bram Moolenaar <Bram () moolenaar ! net>
Date:       2004-05-30 21:01:20
Message-ID: 200405302101.i4UL1Kt9086913 () moolenaar ! net
[Download RAW message or body]


Patch 6.3b.017
Problem:    Win32: "vim --remote-wait" doesn't exit when the server finished
	    editing the file. (David Fishburn)
Solution:   In the rrhelper plugin change backslashes to forward slashes and
	    escape special characters.
Files:	    runtime/plugin/rrhelper.vim


*** ../vim-6.3b.016/runtime/plugin/rrhelper.vim	Sun May 16 22:38:48 2004
--- runtime/plugin/rrhelper.vim	Sun May 30 22:54:17 2004
***************
*** 1,6 ****
  " Vim plugin with helper function(s) for --remote-wait
  " Maintainer: Flemming Madsen <fma@cci.dk>
! " Last Change: 2002 Feb 26
  
  " Has this already been loaded?
  if exists("loaded_rrhelper")
--- 1,6 ----
  " Vim plugin with helper function(s) for --remote-wait
  " Maintainer: Flemming Madsen <fma@cci.dk>
! " Last Change: 2004 May 30
  
  " Has this already been loaded?
  if exists("loaded_rrhelper")
***************
*** 24,31 ****
        " Handle same file from more clients and file being more than once
        " on the command line by encoding this stuff in the group name
        let uniqueGroup = "RemoteReply_".id."_".cnt
        execute "augroup ".uniqueGroup
!       execute 'autocmd '.uniqueGroup.' BufUnload '.argv(cnt).'  call \
DoRemoteReply("'.id.'", "'.cnt.'", "'.uniqueGroup.'", "'.argv(cnt).'")'  let cnt = \
cnt + 1  endwhile
      augroup END
--- 24,35 ----
        " Handle same file from more clients and file being more than once
        " on the command line by encoding this stuff in the group name
        let uniqueGroup = "RemoteReply_".id."_".cnt
+ 
+       " Path separators are always forward slashes for the autocommand pattern.
+       " Escape special characters with a backslash.
+       let f = escape(substitute(argv(cnt), '\\', '/', "g"), ' *,?[{')
        execute "augroup ".uniqueGroup
!       execute "autocmd ".uniqueGroup." BufUnload ". f ."  call \
DoRemoteReply('".id."', '".cnt."', '".uniqueGroup."', '". f ."')"  let cnt = cnt + 1
      endwhile
      augroup END
*** ../vim-6.3b.016/src/version.c	Sun May 30 21:24:15 2004
--- src/version.c	Sun May 30 22:58:40 2004
***************
*** 643,644 ****
--- 643,646 ----
  {   /* Add new patch number below this line */
+ /**/
+     17,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
8. You spend half of the plane trip with your laptop on your lap...and your
   child in the overhead compartment.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\  Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic