Improve a variable name & add a comment
This commit is contained in:
parent
9db99ba80f
commit
d61f2bdf23
@ -959,9 +959,9 @@ function! s:PromptUser(groups) "{{{
|
|||||||
let lines[line_num]['marker'] .= ' '
|
let lines[line_num]['marker'] .= ' '
|
||||||
endif "}}}
|
endif "}}}
|
||||||
|
|
||||||
let target_col = '\%' . (col_num + col_add) . 'c.'
|
let target_col_regexp = '\%' . (col_num + col_add) . 'c.'
|
||||||
let target_char = matchstr(lines[line_num]['marker'],
|
let target_char = matchstr(lines[line_num]['marker'],
|
||||||
\ target_col)
|
\ target_col_regexp)
|
||||||
let space_len = strdisplaywidth(target_char)
|
let space_len = strdisplaywidth(target_char)
|
||||||
\ - strdisplaywidth(marker_char)
|
\ - strdisplaywidth(marker_char)
|
||||||
" Substitute marker character
|
" Substitute marker character
|
||||||
@ -969,7 +969,7 @@ function! s:PromptUser(groups) "{{{
|
|||||||
|
|
||||||
let lines[line_num]['marker'] = substitute(
|
let lines[line_num]['marker'] = substitute(
|
||||||
\ lines[line_num]['marker'],
|
\ lines[line_num]['marker'],
|
||||||
\ target_col,
|
\ target_col_regexp,
|
||||||
\ escape(substitute_expr,'&'),
|
\ escape(substitute_expr,'&'),
|
||||||
\ '')
|
\ '')
|
||||||
|
|
||||||
@ -982,7 +982,7 @@ function! s:PromptUser(groups) "{{{
|
|||||||
let _hl_group = g:EasyMotion_hl2_second_group_target
|
let _hl_group = g:EasyMotion_hl2_second_group_target
|
||||||
endif
|
endif
|
||||||
call EasyMotion#highlight#add_highlight(
|
call EasyMotion#highlight#add_highlight(
|
||||||
\ '\%' . line_num . 'l' . target_col,
|
\ '\%' . line_num . 'l' . target_col_regexp,
|
||||||
\ _hl_group)
|
\ _hl_group)
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
@ -1120,6 +1120,8 @@ function! s:EasyMotion(regexp, direction, visualmode, is_inclusive) " {{{
|
|||||||
let win_first_line = line('w0') " visible first line num
|
let win_first_line = line('w0') " visible first line num
|
||||||
let win_last_line = line('w$') " visible last line num
|
let win_last_line = line('w$') " visible last line num
|
||||||
|
|
||||||
|
" Store the target positions list
|
||||||
|
" e.g. targets = [ [line, col], [line2, col2], ...]
|
||||||
let targets = []
|
let targets = []
|
||||||
|
|
||||||
" Store info for Repeat motion {{{
|
" Store info for Repeat motion {{{
|
||||||
|
Loading…
Reference in New Issue
Block a user