mirror of
https://github.com/preservim/nerdtree.git
synced 2024-11-22 09:30:14 +08:00
Prevent unneeded tree creation in :NERDTreeToggle[VCS] <path> (#1101)
* Don't recreate the NERDTree if its root is the same as being requested. * Use single quotes per Vint's style recommendation. * Update version number in changelog. * Use a simpler method of getting the NERDTree root path. * Remove variable. Just compare agains the function call's result.
This commit is contained in:
parent
f767dd34a0
commit
2d7cb043d4
|
@ -5,6 +5,7 @@
|
|||
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
|
||||
-->
|
||||
#### 6.7
|
||||
- **.5**: Prevent unneeded tree creation in :NERDTreeToggle[VCS] <path> (PhilRunninger) [#1101](https://github.com/preservim/nerdtree/pull/1101)
|
||||
- **.4**: Add missing calls to the `shellescape()` function (lifecrisis) [#1099](https://github.com/preservim/nerdtree/pull/1099)
|
||||
- **.3**: Fix vsplit to not open empty buffers when opening previously closed file (AwkwardKore) [#1098](https://github.com/preservim/nerdtree/pull/1098)
|
||||
- **.2**: Fix infinity loop (on winvim) in FindParentVCSRoot (Eugenij-W) [#1095](https://github.com/preservim/nerdtree/pull/1095)
|
||||
|
|
|
@ -366,7 +366,7 @@ function! s:Creator.toggleTabTree(dir)
|
|||
if g:NERDTree.ExistsForTab()
|
||||
if !g:NERDTree.IsOpen()
|
||||
call self._createTreeWin()
|
||||
if !empty(a:dir)
|
||||
if !empty(a:dir) && a:dir !=# b:NERDTree.root.path.str()
|
||||
call self.createTabTree(a:dir)
|
||||
elseif !&hidden
|
||||
call b:NERDTree.render()
|
||||
|
|
Loading…
Reference in New Issue
Block a user