Merge pull request #144 from natnu/myprototype

Within line motion 時の shade の範囲の変更
This commit is contained in:
haya14busa 2014-04-20 18:59:16 +09:00
commit c87f91d712

View File

@ -1258,13 +1258,25 @@ function! s:EasyMotion(regexp, direction, visualmode, is_inclusive) " {{{
if g:EasyMotion_do_shade && targets_len != 1 && s:flag.dot_repeat != 1
if a:direction == 1
" Backward
let shade_hl_re = '\%'. win_first_line .'l\_.*\%#'
if s:flag.within_line
let shade_hl_re = '^.*\%#'
else
let shade_hl_re = '\%'. win_first_line .'l\_.*\%#'
endif
elseif a:direction == 0
" Forward
let shade_hl_re = '\%#\_.*\%'. win_last_line .'l'
if s:flag.within_line
let shade_hl_re = '\%#.*$'
else
let shade_hl_re = '\%#\_.*\%'. win_last_line .'l'
endif
else
" Both directions"
let shade_hl_re = '\_.*'
if s:flag.within_line
let shade_hl_re = '^.*\%#.*$'
else
let shade_hl_re = '\_.*'
endif
endif
call EasyMotion#highlight#add_highlight(