From ee523987ba1e1ac5da15068d665d2bd62772eefc Mon Sep 17 00:00:00 2001 From: Enno Nagel Date: Thu, 12 Nov 2015 19:38:37 +0100 Subject: [PATCH] imap_mappings: do not swallow leader outside math --- autoload/vimtex/imaps.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/vimtex/imaps.vim b/autoload/vimtex/imaps.vim index 055f64d..ee1e9ca 100644 --- a/autoload/vimtex/imaps.vim +++ b/autoload/vimtex/imaps.vim @@ -49,7 +49,7 @@ function! vimtex#imaps#add_map(map) " {{{1 " Apply wrapper if l:wrapper !=# '' && exists('*' . l:wrapper) - let l:rhs = call(l:wrapper, [l:lhs, l:rhs]) + let l:rhs = call(l:wrapper, [l:leader . l:lhs, l:rhs]) endif " Add mapping @@ -63,7 +63,7 @@ endfunction " function! s:wrap_math(lhs, rhs) " {{{1 return '=is_math() ? ' . string(a:rhs) - \ . ' : ' . string(a:lhs) . '' + \ . ' : ' . string(a:lhs) . '' endfunction " }}}1