hg diff

diff --git a/src/main.c b/src/main.c
--- a/src/main.c
+++ b/src/main.c
@@ -3925,17 +3925,17 @@ cmdsrv_main(argc, argv, serverName_arg,
     static char_u *
 build_drop_cmd(filec, filev, tabs, sendReply)
     int                filec;
     char       **filev;
     int                tabs;           /* Use ":tab drop" instead of ":drop". *
     int                sendReply;
 {
     garray_T   ga;
-    int                i;
+    int                i, len;
     char_u     *inicmd = NULL;
     char_u     *p;
     char_u     *cdp;
     char_u     *cwd;

     if (filec > 0 && filev[0][0] == '+')
     {
        inicmd = (char_u *)filev[0] + 1;
@@ -4011,17 +4011,23 @@ build_drop_cmd(filec, filev, tabs, sendR
      *    elseif getcwd() ==# "current path"
      *      cd -
      *    endif
      *  endif
      */
     ga_concat(&ga, (char_u *)":if !exists('+acd')||!&acd|if haslocaldir()|");
     ga_concat(&ga, (char_u *)"cd -|lcd -|elseif getcwd() ==# \"");
     ga_concat(&ga, cdp);
-    ga_concat(&ga, (char_u *)"\"|cd -|endif|endif<CR>");
+    // len=strlen(cdp);
+    len=0;while(cdp[len++]);
+    if(len>3 && (char_u)'\\' == cdp[len-2] && (char_u)':' == cdp[len-3]){
+        ga_concat(&ga, (char_u *)"\\\"|cd -|endif|endif<CR>");
+    }else{
+        ga_concat(&ga, (char_u *)"\"|cd -|endif|endif<CR>");
+    }
     vim_free(cdp);

     if (sendReply)
        ga_concat(&ga, (char_u *)":call SetupRemoteReplies()<CR>");
     ga_concat(&ga, (char_u *)":");
     if (inicmd != NULL)
     {
        /* Can't use <CR> after "inicmd", because an "startinsert" would cause

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui