Merge pull request #1075 from preservim/1073

Fix regex that finds keyword for minimal menu.
This commit is contained in:
Phil Runninger 2020-01-06 09:21:11 -05:00 committed by GitHub
commit ee79ecfb67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@
- **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR) - **.PATCH**: Pull Request Title (PR Author) [PR Number](Link to PR)
--> -->
#### 6.4 #### 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) - **.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) - **.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) - **.0**: Allow use of function references as callbacks (HiPhish) [#1067](https://github.com/preservim/nerdtree/pull/1067)

View File

@ -62,7 +62,7 @@ function! s:MenuController._echoPrompt()
if self.isMinimal() if self.isMinimal()
let selection = self.menuItems[self.selection].text 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 = map(copy(self.menuItems), "v:val['shortcut']")
let shortcuts[self.selection] = ' ' . keyword . ' ' let shortcuts[self.selection] = ' ' . keyword . ' '