Fixed s:Map to not throw error for empty a:to

This commit is contained in:
Dhruva Sagar
2014-11-21 07:02:38 +05:30
parent d5152bde5e
commit e125870212

View File

@@ -6,7 +6,7 @@ function! s:SetBufferOptDefault(opt, val) "{{{2
endfunction
function! s:Map(map, to, mode) "{{{2
if !empty(a:map) && !hasmapto(a:map, a:mode)
if !empty(a:to) && !hasmapto(a:map, a:mode)
for l:mode in split(a:mode, '.\zs')
execute l:mode . 'map <buffer>' a:to a:map
endfor