nerdtree

A tree explorer plugin for vim.
Index Commits Files Refs
commit b579c7751df9e97c230353d371eb5fae6e4c7d1b
parent 8a14891241e3468f9c13deaa6cf88aebe53b519f
Author: Phil Runninger <prunninger@vhtcx.com>
Date:   Mon,  6 Jan 2020 09:16:16 -0500

Fix regex that finds keyword for minimal menu.

Diffstat:
MCHANGELOG.md | 1+
Mlib/nerdtree/menu_controller.vim | 2+-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
@@ -8,6 +8,7 @@
         - **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
 -->
 #### 6.4
+- **.3**: Fix regex that finds keyword for minimal menu. (PhilRunninger) [#1075](https://github.com/preservim/nerdtree/pull/1075)
 - **.2**: Lint vimscript, fix errors and warnings, add CI job to review PRs (Caleb Maclennan) [#1071](https://github.com/preservim/nerdtree/pull/1071)
 - **.1**: Ensure backward compatibility. v:t_func is not available before Vim 8.0 (Phil Runninger)
 - **.0**: Allow use of function references as callbacks (HiPhish) [#1067](https://github.com/preservim/nerdtree/pull/1067)
diff --git a/lib/nerdtree/menu_controller.vim b/lib/nerdtree/menu_controller.vim
@@ -62,7 +62,7 @@ function! s:MenuController._echoPrompt()
 
     if self.isMinimal()
         let selection = self.menuItems[self.selection].text
-        let keyword = matchstr(selection, '\([^ ]*')
+        let keyword = matchstr(selection, '[^ ]*([^ ]*')
 
         let shortcuts = map(copy(self.menuItems), "v:val['shortcut']")
         let shortcuts[self.selection] = ' ' . keyword . ' '