diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 02:10:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 02:10:58 +0000 |
commit | bee19c22d569e54513a9c591441c7f411811dc81 (patch) | |
tree | b990d2df9fddb8194bfe49e9205005a0d952bc1f /src/clientserver.c | |
parent | Adding upstream version 2:9.1.0199. (diff) | |
download | vim-bee19c22d569e54513a9c591441c7f411811dc81.tar.xz vim-bee19c22d569e54513a9c591441c7f411811dc81.zip |
Adding upstream version 2:9.1.0374.upstream/2%9.1.0374
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/clientserver.c')
-rw-r--r-- | src/clientserver.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/clientserver.c b/src/clientserver.c index 340add3..b19cd44 100644 --- a/src/clientserver.c +++ b/src/clientserver.c @@ -608,7 +608,7 @@ build_drop_cmd( // Call inputsave() so that a prompt for an encryption key works. ga_concat(&ga, (char_u *) - "<CR>:if exists('*inputsave')|call inputsave()|endif|"); + "<CR><C-\\><C-N>:if exists('*inputsave')|call inputsave()|endif|"); if (tabs) ga_concat(&ga, (char_u *)"tab "); ga_concat(&ga, (char_u *)"drop"); @@ -652,7 +652,13 @@ build_drop_cmd( // endif // endif ga_concat(&ga, (char_u *)":if !exists('+acd')||!&acd|if haslocaldir()|"); +#ifdef MSWIN + // in case :set shellslash is set, need to normalize the directory separators + // '/' is not valid in a filename so replacing '/' by '\\' should be safe + ga_concat(&ga, (char_u *)"cd -|lcd -|elseif getcwd()->tr('/','\\') ==# '"); +#else ga_concat(&ga, (char_u *)"cd -|lcd -|elseif getcwd() ==# '"); +#endif ga_concat(&ga, cdp); ga_concat(&ga, (char_u *)"'|cd -|endif|endif<CR>"); vim_free(cdp); |