diff --git a/autoload/EasyMotion.vim b/autoload/EasyMotion.vim index 5ea1f7e..44d3fb6 100644 --- a/autoload/EasyMotion.vim +++ b/autoload/EasyMotion.vim @@ -1256,27 +1256,18 @@ function! s:EasyMotion(regexp, direction, visualmode, is_inclusive) " {{{ " -- Shade inactive source --------------- {{{ if g:EasyMotion_do_shade && targets_len != 1 && s:flag.dot_repeat != 1 - if a:direction == 1 - " Backward - if s:flag.within_line - let shade_hl_re = '^.*\%#' - else - let shade_hl_re = '\%'. win_first_line .'l\_.*\%#' - endif - elseif a:direction == 0 - " Forward - if s:flag.within_line - let shade_hl_re = '\%#.*$' - else - let shade_hl_re = '\%#\_.*\%'. win_last_line .'l' - endif - else - " Both directions" - if s:flag.within_line - let shade_hl_re = '^.*\%#.*$' - else - let shade_hl_re = '\_.*' - endif + if a:direction == 1 " Backward + let shade_hl_re = s:flag.within_line + \ ? '^.*\%#' + \ : '\%'. win_first_line .'l\_.*\%#' + elseif a:direction == 0 " Forward + let shade_hl_re = s:flag.within_line + \ ? '\%#.*$' + \ : '\%#\_.*\%'. win_last_line .'l' + else " Both directions + let shade_hl_re = s:flag.within_line + \ ? '^.*\%#.*$' + \ : '\_.*' endif call EasyMotion#highlight#add_highlight(