Skip to content

Commit 8b0bec6

Browse files
committed
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.
1 parent e3ee8c9 commit 8b0bec6

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

autoload/EasyMotion.vim

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ function! EasyMotion#init()
5353
let s:EasyMotion_is_cancelled = 0
5454
" 0 -> Success
5555
" 1 -> Cancel
56-
let g:EasyMotion_ignore_exception = 0
5756
return ""
5857
endfunction
5958
"}}}
@@ -405,11 +404,7 @@ function! s:Prompt(message) " {{{
405404
echohl None
406405
endfunction " }}}
407406
function! s:Throw(message) "{{{
408-
if g:EasyMotion_verbose
409-
throw 'EasyMotion: ' . a:message
410-
else
411-
throw
412-
endif
407+
throw 'EasyMotion: ' . a:message
413408
endfunction "}}}
414409

415410
" -- Save & Restore values ---------------
@@ -1527,7 +1522,7 @@ function! s:EasyMotion(regexp, direction, visualmode, is_inclusive, ...) " {{{
15271522
redraw
15281523

15291524
" Show exception message
1530-
if g:EasyMotion_ignore_exception != 1
1525+
if g:EasyMotion_verbose == 1
15311526
echo v:exception
15321527
endif
15331528

0 commit comments

Comments
 (0)