Better Throw behaviour
Make sure the exception is thrown, to clean up and do other things, but show the message only if the verbose option is set.
This commit is contained in:
parent
e3ee8c96b2
commit
8b0bec6105
@ -53,7 +53,6 @@ function! EasyMotion#init()
|
|||||||
let s:EasyMotion_is_cancelled = 0
|
let s:EasyMotion_is_cancelled = 0
|
||||||
" 0 -> Success
|
" 0 -> Success
|
||||||
" 1 -> Cancel
|
" 1 -> Cancel
|
||||||
let g:EasyMotion_ignore_exception = 0
|
|
||||||
return ""
|
return ""
|
||||||
endfunction
|
endfunction
|
||||||
"}}}
|
"}}}
|
||||||
@ -405,11 +404,7 @@ function! s:Prompt(message) " {{{
|
|||||||
echohl None
|
echohl None
|
||||||
endfunction " }}}
|
endfunction " }}}
|
||||||
function! s:Throw(message) "{{{
|
function! s:Throw(message) "{{{
|
||||||
if g:EasyMotion_verbose
|
|
||||||
throw 'EasyMotion: ' . a:message
|
throw 'EasyMotion: ' . a:message
|
||||||
else
|
|
||||||
throw
|
|
||||||
endif
|
|
||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
|
|
||||||
" -- Save & Restore values ---------------
|
" -- Save & Restore values ---------------
|
||||||
@ -1527,7 +1522,7 @@ function! s:EasyMotion(regexp, direction, visualmode, is_inclusive, ...) " {{{
|
|||||||
redraw
|
redraw
|
||||||
|
|
||||||
" Show exception message
|
" Show exception message
|
||||||
if g:EasyMotion_ignore_exception != 1
|
if g:EasyMotion_verbose == 1
|
||||||
echo v:exception
|
echo v:exception
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user