fix a bug with the key combos on the comment menu

Previously the maps on the menus werent changing when mapleader was
changed - this was because we were looking for a local mapleader var
instead of global
This commit is contained in:
Martin Grenfell 2012-01-13 09:32:02 +00:00
parent 8f2af9a6d7
commit f4d9f99f67

View File

@ -2709,7 +2709,7 @@ function! s:CreateMaps(modes, target, desc, combo)
\ g:NERDMenuMode, '')
let menu_command = 'menu <silent> ' . menuRoot . '.' . escape(a:desc, ' ')
if strlen(a:combo)
let leader = exists('mapleader') ? mapleader : '\'
let leader = exists('g:mapleader') ? g:mapleader : '\'
let menu_command .= '<Tab>' . escape(leader, '\') . a:combo
endif
let menu_command .= ' ' . (strlen(a:combo) ? plug : a:target)