|
16 | 16 | " 2025 Nov 13 by Vim Project don't wipe unnamed buffers #18740 |
17 | 17 | " 2025 Nov 18 by Vim Project use UNC paths when using scp and Windows paths #18764 |
18 | 18 | " 2025 Nov 28 by Vim Project fix undefined variable in *NetrwMenu #18829 |
| 19 | +" 2025 Dec 26 by Vim Project fix use of g:netrw_cygwin #19015 |
19 | 20 | " Copyright: Copyright (C) 2016 Charles E. Campbell {{{1 |
20 | 21 | " Permission is hereby granted to use and distribute this code, |
21 | 22 | " with or without modifications, provided that this copyright |
@@ -213,7 +214,7 @@ call s:NetrwInit("g:netrw_dirhistmax" , 10) |
213 | 214 | call s:NetrwInit("g:netrw_fastbrowse" , 1) |
214 | 215 | call s:NetrwInit("g:netrw_ftp_browse_reject", '^total\s\+\d\+$\|^Trying\s\+\d\+.*$\|^KERBEROS_V\d rejected\|^Security extensions not\|No such file\|: connect to address [0-9a-fA-F:]*: No route to host$') |
215 | 216 | if !exists("g:netrw_ftp_list_cmd") |
216 | | - if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin) |
| 217 | + if has("unix") || g:netrw_cygwin |
217 | 218 | let g:netrw_ftp_list_cmd = "ls -lF" |
218 | 219 | let g:netrw_ftp_timelist_cmd = "ls -tlF" |
219 | 220 | let g:netrw_ftp_sizelist_cmd = "ls -slF" |
@@ -320,7 +321,7 @@ call s:NetrwInit("g:netrw_menu" , 1) |
320 | 321 | call s:NetrwInit("g:netrw_mkdir_cmd" , g:netrw_ssh_cmd." USEPORT HOSTNAME mkdir") |
321 | 322 | call s:NetrwInit("g:netrw_mousemaps" , (exists("+mouse") && &mouse =~# '[anh]')) |
322 | 323 | call s:NetrwInit("g:netrw_retmap" , 0) |
323 | | -if has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin) |
| 324 | +if has("unix") || g:netrw_cygwin |
324 | 325 | call s:NetrwInit("g:netrw_chgperm" , "chmod PERM FILENAME") |
325 | 326 | elseif has("win32") |
326 | 327 | call s:NetrwInit("g:netrw_chgperm" , "cacls FILENAME /e /p PERM") |
@@ -442,7 +443,7 @@ function netrw#Explore(indx,dosplit,style,...) |
442 | 443 |
|
443 | 444 | " record current directory |
444 | 445 | let curdir = simplify(b:netrw_curdir) |
445 | | - if !exists("g:netrw_cygwin") && has("win32") |
| 446 | + if !g:netrw_cygwin && has("win32") |
446 | 447 | let curdir= substitute(curdir,'\','/','g') |
447 | 448 | endif |
448 | 449 | let curfiledir = substitute(expand("%:p"),'^\(.*[/\\]\)[^/\\]*$','\1','e') |
@@ -520,7 +521,7 @@ function netrw#Explore(indx,dosplit,style,...) |
520 | 521 | NetrwKeepj norm! 0 |
521 | 522 |
|
522 | 523 | if a:0 > 0 |
523 | | - if a:1 =~ '^\~' && (has("unix") || (exists("g:netrw_cygwin") && g:netrw_cygwin)) |
| 524 | + if a:1 =~ '^\~' && (has("unix") || g:netrw_cygwin) |
524 | 525 | let dirname= simplify(substitute(a:1,'\~',expand("$HOME"),'')) |
525 | 526 | elseif a:1 == '.' |
526 | 527 | let dirname= simplify(exists("b:netrw_curdir")? b:netrw_curdir : getcwd()) |
@@ -3234,7 +3235,7 @@ function s:NetrwFile(fname) |
3234 | 3235 | let b:netrw_curdir= getcwd() |
3235 | 3236 | endif |
3236 | 3237 |
|
3237 | | - if !exists("g:netrw_cygwin") && has("win32") |
| 3238 | + if !g:netrw_cygwin && has("win32") |
3238 | 3239 | if fname =~ '^\' || fname =~ '^\a:\' |
3239 | 3240 | " windows, but full path given |
3240 | 3241 | let ret= fname |
|
0 commit comments