diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2026-03-02 08:52:23 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2026-04-23 12:51:11 +0800 |
| commit | 84cafb9c97fa4678b45acdc56c8b2f95231fc3e7 (patch) | |
| tree | 2a1b1cd363f80ed97bd553f08fd4772ba4b796f9 /runtime/pack | |
| parent | ed12d56163dd4e355ca8b7e83bbe2fc207e843b9 (diff) | |
vim-patch:9.2.0037: netrw: need better tests for absolute paths
Problem: netrw: need better tests for absolute paths
Solution: Use absolutepath(), instead of regex test (Miguel Barro).
closes: vim/vim#19477
https://github.com/vim/vim/commit/bd1dc5b1a652e9f2ba45e3695ea2d83e81992c88
Cherry-pick a typo fix from latest Vim.
Co-authored-by: Miguel Barro <miguel.barro@live.com>
Diffstat (limited to 'runtime/pack')
| -rw-r--r-- | runtime/pack/dist/opt/netrw/autoload/netrw.vim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw.vim b/runtime/pack/dist/opt/netrw/autoload/netrw.vim index ba9f511138..670de1cc15 100644 --- a/runtime/pack/dist/opt/netrw/autoload/netrw.vim +++ b/runtime/pack/dist/opt/netrw/autoload/netrw.vim @@ -19,6 +19,7 @@ " 2025 Dec 26 by Vim Project fix use of g:netrw_cygwin #19015 " 2026 Jan 19 by Vim Project do not create swapfiles #18854 " 2026 Feb 15 by Vim Project fix global variable initialization for MS-Windows #19287 +" 2026 Feb 21 by Vim Project better absolute path detection on MS-Windows #19477 " Copyright: Copyright (C) 2016 Charles E. Campbell {{{1 " Permission is hereby granted to use and distribute this code, " with or without modifications, provided that this copyright @@ -3239,7 +3240,7 @@ function s:NetrwFile(fname) endif if !g:netrw_cygwin && has("win32") - if fname =~ '^\' || fname =~ '^\a:\' + if isabsolutepath(fname) " windows, but full path given let ret= fname else |
