Mercurial > vim
comparison runtime/autoload/netrw.vim @ 34161:f1a387b72cdf
runtime(netrw): minor changes to fix move cmd on windows (#13823)
Commit: https://github.com/vim/vim/commit/6e5a6c9965f667712494ae0a9df8a407267cc72f
Author: MiguelBarro <45819833+MiguelBarro@users.noreply.github.com>
Date: Wed Jan 17 21:35:36 2024 +0100
runtime(netrw): minor changes to fix move cmd on windows (https://github.com/vim/vim/issues/13823)
Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 17 Jan 2024 21:45:02 +0100 |
parents | 06444c35272b |
children | 27e9e258dc11 |
comparison
equal
deleted
inserted
replaced
34160:1c5aedec78c3 | 34161:f1a387b72cdf |
---|---|
7860 let movecmd = substitute(g:netrw_localmovecmd,'\s.*$','','') | 7860 let movecmd = substitute(g:netrw_localmovecmd,'\s.*$','','') |
7861 let movecmdargs = substitute(g:netrw_localmovecmd,'^.\{-}\(\s.*\)$','\1','') | 7861 let movecmdargs = substitute(g:netrw_localmovecmd,'^.\{-}\(\s.*\)$','\1','') |
7862 let movecmd = netrw#WinPath(movecmd).movecmdargs | 7862 let movecmd = netrw#WinPath(movecmd).movecmdargs |
7863 " call Decho("windows exception: movecmd<".movecmd."> (#1: had a space)",'~'.expand("<slnum>")) | 7863 " call Decho("windows exception: movecmd<".movecmd."> (#1: had a space)",'~'.expand("<slnum>")) |
7864 else | 7864 else |
7865 let movecmd = netrw#WinPath(movecmd) | 7865 let movecmd = netrw#WinPath(g:netrw_localmovecmd) |
7866 " call Decho("windows exception: movecmd<".movecmd."> (#2: no space)",'~'.expand("<slnum>")) | 7866 " call Decho("windows exception: movecmd<".movecmd."> (#2: no space)",'~'.expand("<slnum>")) |
7867 endif | 7867 endif |
7868 else | 7868 else |
7869 let movecmd = netrw#WinPath(g:netrw_localmovecmd) | 7869 let movecmd = netrw#WinPath(g:netrw_localmovecmd) |
7870 " call Decho("movecmd<".movecmd."> (#3 linux or cygwin)",'~'.expand("<slnum>")) | 7870 " call Decho("movecmd<".movecmd."> (#3 linux or cygwin)",'~'.expand("<slnum>")) |
7874 " Jul 19, 2022: fixing file move when g:netrw_keepdir is 1 | 7874 " Jul 19, 2022: fixing file move when g:netrw_keepdir is 1 |
7875 let fname= b:netrw_curdir."/".fname | 7875 let fname= b:netrw_curdir."/".fname |
7876 endif | 7876 endif |
7877 if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) | 7877 if !g:netrw_cygwin && (has("win32") || has("win95") || has("win64") || has("win16")) |
7878 let fname= substitute(fname,'/','\\','g') | 7878 let fname= substitute(fname,'/','\\','g') |
7879 if g:netrw_keepdir | |
7880 " Jul 19, 2022: fixing file move when g:netrw_keepdir is 1 | |
7881 let fname= b:netrw_curdir."\\".fname | |
7882 endif | |
7883 endif | 7879 endif |
7884 " call Decho("system(".movecmd." ".s:ShellEscape(fname)." ".tgt.")",'~'.expand("<slnum>")) | 7880 " call Decho("system(".movecmd." ".s:ShellEscape(fname)." ".tgt.")",'~'.expand("<slnum>")) |
7885 let ret= system(movecmd.g:netrw_localmovecmdopt." ".s:ShellEscape(fname)." ".tgt) | 7881 let ret= system(movecmd.g:netrw_localmovecmdopt." ".s:ShellEscape(fname)." ".tgt) |
7886 if v:shell_error != 0 | 7882 if v:shell_error != 0 |
7887 if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && !g:netrw_keepdir | 7883 if exists("b:netrw_curdir") && b:netrw_curdir != getcwd() && !g:netrw_keepdir |