mirror of
https://github.com/preservim/nerdtree.git
synced 2025-12-13 20:36:50 +01:00
Respect user's &shellslash setting in CopyNode and RemoveNode functions (#1150)
* Replace s:Path.Slash() with nerdtree#slash(). * Check the value of &shell when determining the slash under Windows. * Leave &shellslash unchanged when forming copy/delete commands. * Fix fold marker. * Update version number in change log. * Add abort attribute to nerdtree#slash() to satisfy Vim style guide. Co-authored-by: Phil Runninger <prunninger@vhtcx.com>
This commit is contained in:
@@ -278,8 +278,8 @@ function! s:TreeDirNode._glob(pattern, all)
|
||||
else
|
||||
let l:pathSpec = escape(fnamemodify(self.path.str({'format': 'Glob'}), ':.'), ',')
|
||||
|
||||
" On Windows, the drive letter may be removed by fnamemodify().
|
||||
if nerdtree#runningWindows() && l:pathSpec[0] ==# g:NERDTreePath.Slash()
|
||||
" On Windows, the drive letter may be removed by "fnamemodify()".
|
||||
if nerdtree#runningWindows() && l:pathSpec[0] == nerdtree#slash()
|
||||
let l:pathSpec = self.path.drive . l:pathSpec
|
||||
endif
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user