commit a1fa4a33bf16b6661e502080fc97788bb98afd35
parent 3a9d533f3de86a43b69f6c47d3394c0d866fdb08
Author: Phil Runninger <PhilRunninger@users.noreply.github.com>
Date: Fri, 12 Feb 2021 23:14:26 -0500
Fix mouse-clicking a file to open it, which was broken in 6.10.5. (#1225)
* Fix mouse-clicking a file to open it, which was broken in 6.10.5.
* Update version number in change log.
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
@@ -5,6 +5,7 @@
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
-->
#### 6.10
+- **.7**: Fix mouse-clicking a file to open it. (PhilRunninger) [#1225](https://github.com/preservim/nerdtree/pull/1225)
- **.6**: Restore the default behavior of the <CR> key. (PhilRunninger) [#1221](https://github.com/preservim/nerdtree/pull/1221)
- **.5**: Fix `{'keepopen':0}` in NERDTreeCustomOpenArgs (PhilRunninger) [#1217](https://github.com/preservim/nerdtree/pull/1217)
- **.4**: Removed directory separator from sort key (Daniel E) [#1219](https://github.com/preservim/nerdtree/pull/1219)
diff --git a/autoload/nerdtree/ui_glue.vim b/autoload/nerdtree/ui_glue.vim
@@ -373,7 +373,7 @@ function! s:handleLeftClick() abort
if currentNode.path.isDirectory
call currentNode.activate()
else
- call currentNode.activate({'reuse': 'all', 'where': 'p'})
+ call currentNode.activate({'reuse': 'all', 'where': 'p', 'keepopen':!nerdtree#closeTreeOnOpen()})
endif
return
endif