mirror of
https://github.com/amix/vimrc
synced 2025-06-16 01:25:00 +08:00
Updated plugins
This commit is contained in:
@ -1230,7 +1230,7 @@ function! s:wait_for_user_input(mode)
|
||||
let s:saved_keys = ""
|
||||
endif
|
||||
|
||||
" ambiguous mappings are note supported; e.g.:
|
||||
" ambiguous mappings are not supported; e.g.:
|
||||
" imap jj JJ
|
||||
" imap jjj JJJ
|
||||
" will always trigger the 'jj' mapping
|
||||
@ -1239,8 +1239,8 @@ function! s:wait_for_user_input(mode)
|
||||
let s_time = s:get_time_in_ms()
|
||||
while 1
|
||||
let map_dict = maparg(s:char, "i", 0, 1)
|
||||
" break if chars exactly match mapping or if chars don't match beging of mapping anymore
|
||||
if map_dict != {} || mapcheck(s:char, "i") == ""
|
||||
" break if chars exactly match mapping
|
||||
if map_dict != {}
|
||||
if get(map_dict, 'expr', 0)
|
||||
" handle case where {rhs} is a function
|
||||
exec 'let char_mapping = ' . map_dict['rhs']
|
||||
@ -1251,6 +1251,10 @@ function! s:wait_for_user_input(mode)
|
||||
exec 'let s:char = "'.substitute(char_mapping, '<', '\\<', 'g').'"'
|
||||
break
|
||||
endif
|
||||
" break if chars don't match beginning of mapping anymore
|
||||
if mapcheck(s:char, "i") == ""
|
||||
break
|
||||
endif
|
||||
if s:get_time_in_ms() > (s_time + &timeoutlen)
|
||||
break
|
||||
endif
|
||||
|
Reference in New Issue
Block a user