runtime(netrw): Ensure netrw#fs#Dirname() always returns a trailing slash
Commit:
https://github.com/vim/vim/commit/5f836749fa84cf81342d5a7fd9fad3b5c68c86cc
Author: Miguel Barro <[email protected]>
Date: Fri Sep 5 11:33:56 2025 +0200
runtime(netrw): Ensure netrw#fs#Dirname() always returns a trailing slash
closes: https://github.com/vim/vim/issues/18199
Signed-off-by: Miguel Barro <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw.vim
b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
index 1c98104d0..6863c222d 100644
--- a/runtime/pack/dist/opt/netrw/autoload/netrw.vim
+++ b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
@@ -5,6 +5,7 @@
" 2025 Aug 07 by Vim Project (use correct "=~#" for netrw_stylesize option
#17901)
" 2025 Aug 07 by Vim Project (netrw#BrowseX() distinguishes remote files
#17794)
" 2025 Aug 22 by Vim Project netrw#Explore handle terminal correctly #18069
+" 2025 Sep 05 by Vim Project ensure netrw#fs#Dirname() returns trailing slash
#18199
" 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
diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw/fs.vim
b/runtime/pack/dist/opt/netrw/autoload/netrw/fs.vim
index 5e530a8a5..2f0841500 100644
--- a/runtime/pack/dist/opt/netrw/autoload/netrw/fs.vim
+++ b/runtime/pack/dist/opt/netrw/autoload/netrw/fs.vim
@@ -87,7 +87,8 @@ endfunction
" netrw#fs#Dirname: {{{
function netrw#fs#Dirname(path)
- return netrw#fs#AbsPath(a:path)->fnamemodify(':h')
+ " Keep a slash as directory recognition pattern
+ return netrw#fs#AbsPath(a:path) . s:slash
endfunction
" }}}
--
--
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].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1uuT0B-005Hbt-Ua%40256bit.org.