mirror of
https://github.com/preservim/nerdcommenter.git
synced 2025-02-27 22:18:39 +08:00
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:
parent
8f2af9a6d7
commit
f4d9f99f67
@ -2709,7 +2709,7 @@ function! s:CreateMaps(modes, target, desc, combo)
|
|||||||
\ g:NERDMenuMode, '')
|
\ g:NERDMenuMode, '')
|
||||||
let menu_command = 'menu <silent> ' . menuRoot . '.' . escape(a:desc, ' ')
|
let menu_command = 'menu <silent> ' . menuRoot . '.' . escape(a:desc, ' ')
|
||||||
if strlen(a:combo)
|
if strlen(a:combo)
|
||||||
let leader = exists('mapleader') ? mapleader : '\'
|
let leader = exists('g:mapleader') ? g:mapleader : '\'
|
||||||
let menu_command .= '<Tab>' . escape(leader, '\') . a:combo
|
let menu_command .= '<Tab>' . escape(leader, '\') . a:combo
|
||||||
endif
|
endif
|
||||||
let menu_command .= ' ' . (strlen(a:combo) ? plug : a:target)
|
let menu_command .= ' ' . (strlen(a:combo) ? plug : a:target)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user