fix empty input
ref: https://github.com/easymotion/vim-easymotion/issues/265#issuecomment-173485469
This commit is contained in:
parent
fc7d1d9a5d
commit
fc056f37fd
@ -141,7 +141,9 @@ endfunction " }}}
|
||||
function! EasyMotion#OverwinF(num_strokes) " {{{
|
||||
let re = s:findMotion(a:num_strokes, s:DIRECTION.bidirection)
|
||||
call EasyMotion#reset()
|
||||
if re isnot# ''
|
||||
return EasyMotion#overwin#move(re)
|
||||
endif
|
||||
endfunction "}}}
|
||||
function! EasyMotion#T(num_strokes, visualmode, direction) " {{{
|
||||
if a:direction == 1
|
||||
|
@ -4,6 +4,7 @@ function! s:_vital_loaded(V) abort
|
||||
let s:Buffer = a:V.import('Vim.Buffer')
|
||||
let s:Prelude = a:V.import('Prelude')
|
||||
let s:Set = a:V.import('Data.Set')
|
||||
let s:Input = a:V.import('Over.Input')
|
||||
endfunction
|
||||
|
||||
function! s:_vital_depends() abort
|
||||
@ -13,6 +14,7 @@ function! s:_vital_depends() abort
|
||||
\ 'Vim.Buffer',
|
||||
\ 'Prelude',
|
||||
\ 'Data.Set',
|
||||
\ 'Over.Input',
|
||||
\ ]
|
||||
endfunction
|
||||
|
||||
@ -45,16 +47,16 @@ endfunction
|
||||
|
||||
function! s:move_f(...) abort
|
||||
echo 'Target: '
|
||||
let c = s:getchar()
|
||||
let c = s:Input.getchar()
|
||||
return s:move(c, get(a:, 1, {}))
|
||||
endfunction
|
||||
|
||||
function! s:move_f2() abort
|
||||
echo 'Target: '
|
||||
let c = s:getchar()
|
||||
let c = s:Input.getchar()
|
||||
redraw
|
||||
echo 'Target: ' . c
|
||||
let c2 = s:getchar()
|
||||
let c2 = s:Input.getchar()
|
||||
return s:move(s:Prelude.escape_pattern(c . c2), get(a:, 1, {}))
|
||||
endfunction
|
||||
|
||||
@ -219,7 +221,7 @@ function! s:overwin.choose_prompt(hint_dict) abort
|
||||
call hinter.show_hint()
|
||||
redraw
|
||||
echo 'Target key: '
|
||||
let c = s:getchar()
|
||||
let c = s:Input.getchar()
|
||||
if self.config.use_upper
|
||||
let c = toupper(c)
|
||||
endif
|
||||
@ -734,18 +736,6 @@ function! s:is_in_fold(lnum) abort
|
||||
return foldclosed(a:lnum) != -1
|
||||
endfunction
|
||||
|
||||
function! s:getchar(...) abort
|
||||
let mode = get(a:, 1, 0)
|
||||
while 1
|
||||
let char = call('getchar', a:000)
|
||||
" Workaround for the <expr> mappings
|
||||
if string(char) !~# "\x80\xfd`"
|
||||
return mode == 1 ? !!char
|
||||
\ : type(char) == type(0) ? nr2char(char) : char
|
||||
endif
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
" @param {funcref} func
|
||||
" @param {arglist} list<S>
|
||||
" @param {dict?} dict for :h call()
|
||||
|
Loading…
Reference in New Issue
Block a user