0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

runtime(netrw): Ensure netrw#fs#Dirname() always returns a trailing slash

closes: #18199

Signed-off-by: Miguel Barro <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Miguel Barro
2025-09-05 11:33:56 +02:00
committed by Christian Brabandt
parent d2b28ddfc2
commit 5f836749fa
2 changed files with 3 additions and 1 deletions

View File

@@ -5,6 +5,7 @@
" 2025 Aug 07 by Vim Project (use correct "=~#" for netrw_stylesize option #17901) " 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 07 by Vim Project (netrw#BrowseX() distinguishes remote files #17794)
" 2025 Aug 22 by Vim Project netrw#Explore handle terminal correctly #18069 " 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 " Copyright: Copyright (C) 2016 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code, " Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright " with or without modifications, provided that this copyright

View File

@@ -87,7 +87,8 @@ endfunction
" netrw#fs#Dirname: {{{ " netrw#fs#Dirname: {{{
function netrw#fs#Dirname(path) 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 endfunction
" }}} " }}}