Fixed #486: Relax the map guard
This commit is contained in:
parent
bea8939a94
commit
7234c5a64f
@ -339,8 +339,7 @@ function! s:init_mappings() " {{{1
|
|||||||
if !get(g:,'vimtex_mappings_enabled', 1) | return | endif
|
if !get(g:,'vimtex_mappings_enabled', 1) | return | endif
|
||||||
|
|
||||||
function! s:map(mode, lhs, rhs, ...)
|
function! s:map(mode, lhs, rhs, ...)
|
||||||
if !hasmapto(a:rhs, a:mode)
|
if (a:0 > 0) || (maparg(a:lhs, a:mode) ==# '')
|
||||||
\ && (a:0 > 0 || maparg(a:lhs, a:mode) ==# '')
|
|
||||||
silent execute a:mode . 'map <silent><buffer>' a:lhs a:rhs
|
silent execute a:mode . 'map <silent><buffer>' a:lhs a:rhs
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
x
Reference in New Issue
Block a user