commit 0c12f6fe1055e75afbac250ae59af7712088feab
parent 73e2d8ca7ed0d3eb4fce2c3220b9ce0e64ce57fc
Author: Martin Grenfell <martin.grenfell@gmail.com>
Date: Tue, 3 Jan 2012 16:08:10 +0000
update quickhelp for custom mappings
dont display quickhelp for a mapping if there is no text to display -
this prevents all the default mappings from being displayed under the
"custom mappings" section.
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -3091,13 +3091,13 @@ function! s:dumpHelp()
let @h=@h."\" ". g:NERDTreeMapToggleBookmarks .": bookmarks (" . (b:NERDTreeShowBookmarks ? "on" : "off") . ")\n"
"add quickhelp entries for each custom key map
- if len(s:KeyMap.All())
- let @h=@h."\"\n\" ----------------------------\n"
- let @h=@h."\" Custom mappings~\n"
- for i in s:KeyMap.All()
+ let @h=@h."\"\n\" ----------------------------\n"
+ let @h=@h."\" Custom mappings~\n"
+ for i in s:KeyMap.All()
+ if !empty(i.quickhelpText)
let @h=@h."\" ". i.key .": ". i.quickhelpText ."\n"
- endfor
- endif
+ endif
+ endfor
let @h=@h."\"\n\" ----------------------------\n"
let @h=@h."\" Other mappings~\n"