mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-22 09:30:14 +08:00
File Move: Escape existing directory name when looking for open files. (#1094)
* File Move: Escape existing directory name when looking for open files. * Update version number in change log. Co-authored-by: Phil Runninger <prunninger@vhtcx.com>
This commit is contained in:
parent
e67324fdea
commit
495b4e781a
|
@ -5,6 +5,7 @@
|
|||
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
|
||||
-->
|
||||
#### 6.7
|
||||
- **.1**: File Move: Escape existing directory name when looking for open files. (PhilRunninger) [#1094](https://github.com/preservim/nerdtree/pull/1094)
|
||||
- **.0**: Open the parent directory when revealing a non-existent file with :NERDTreeFind (bouk) [#1090](https://github.com/preservim/nerdtree/pull/1090)
|
||||
#### 6.6
|
||||
- **.1**: [add] How to install using dein.vim (kazukazuinaina) [#1087](https://github.com/preservim/nerdtree/pull/1087)
|
||||
|
|
|
@ -209,7 +209,8 @@ function! NERDTreeMoveNode()
|
|||
|
||||
try
|
||||
if curNode.path.isDirectory
|
||||
let l:openBuffers = filter(range(1,bufnr('$')),'bufexists(v:val) && fnamemodify(bufname(v:val),":p") =~# curNode.path.str() . "/.*"')
|
||||
let l:curPath = escape(curNode.path.str(),'\') . (nerdtree#runningWindows()?'\\':'/') . '.*'
|
||||
let l:openBuffers = filter(range(1,bufnr('$')),'bufexists(v:val) && fnamemodify(bufname(v:val),":p") =~# "'.escape(l:curPath,'\').'"')
|
||||
else
|
||||
let l:openBuffers = filter(range(1,bufnr('$')),'bufexists(v:val) && fnamemodify(bufname(v:val),":p") ==# curNode.path.str()')
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user