@@ -72,7 +72,7 @@ let s:overwin = {
7272\ ' cursor' : ' HitAHintCursor' ,
7373\ },
7474\ ' jump_first_target_keys' : [],
75- \ ' do_shade' : s: TRUE ,
75+ \ ' do_shade' : s: FALSE ,
7676\ }
7777\ }
7878
@@ -539,11 +539,10 @@ function! s:Hinter._show_hint_for_line(winnr, lnum, col2hint) abort
539539 let is_consecutive = cnum is # prev_cnum + 1
540540 if ! is_consecutive
541541 let col_num += next_offset
542- else
543- let save_next_offset = next_offset
544542 endif
543+ let save_next_offset = next_offset
545544
546- let [line , offset, next_offset] = self ._replace_line_for_hint (a: lnum , col_num, line , hint)
545+ let [line , offset, next_offset] = self ._replace_line_for_hint (col_num, line , hint)
547546
548547 if is_consecutive
549548 let col_offset += save_next_offset
@@ -570,7 +569,7 @@ endfunction
570569" depends on the col number of next hint in the same line, so it returns
571570" `next_offset` instead of returning offset all at once.
572571" @return {(string, number, number)} (line, offset, next_offset)
573- function ! s: Hinter ._replace_line_for_hint (lnum, col_num, line , hint) abort
572+ function ! s: Hinter ._replace_line_for_hint (col_num, line , hint) abort
574573 let line = a: line
575574 let col_num = a: col_num
576575 let do_replace_target = ! (self .config.do_shade || s: can_preserve_syntax )
@@ -585,9 +584,9 @@ function! s:Hinter._replace_line_for_hint(lnum, col_num, line, hint) abort
585584
586585 let offset = 0
587586 if target is # " \t "
588- let [line , offset] = self ._replace_tab_target (a: lnum , col_num, line )
587+ let [line , offset] = self ._replace_tab_target (col_num, line )
589588 elseif strdisplaywidth (target) > 1
590- let line = self ._replace_text_to_space (line , a: lnum , col_num, strdisplaywidth (target))
589+ let line = self ._replace_text_to_space (line , col_num, strdisplaywidth (target))
591590 let offset = strdisplaywidth (target) - len (target)
592591 else
593592 if do_replace_target
@@ -602,19 +601,19 @@ function! s:Hinter._replace_line_for_hint(lnum, col_num, line, hint) abort
602601 let next_offset = 0
603602 if len (a: hint ) > 1 && target isnot # " \t "
604603 " pass [' '] as hint to stop recursion.
605- let [line , next_offset, _] = self ._replace_line_for_hint (a: lnum , col_num + offset + 1 , line , [' ' ])
604+ let [line , next_offset, _] = self ._replace_line_for_hint (col_num + offset + 1 , line , [' ' ])
606605 endif
607606 return [line , offset, next_offset]
608607endfunction
609608
610609" @return {(line, offset)}
611- function ! s: Hinter ._replace_tab_target (lnum, col_num, line ) abort
610+ function ! s: Hinter ._replace_tab_target (col_num, line ) abort
612611 let space_len = s: tab2spacelen (a: line , a: col_num )
613- let line = self ._replace_text_to_space (a: line , a: lnum , a: col_num , space_len)
612+ let line = self ._replace_text_to_space (a: line , a: col_num , space_len)
614613 return [line , space_len - 1 ]
615614endfunction
616615
617- function ! s: Hinter ._replace_text_to_space (line , lnum, col_num, len ) abort
616+ function ! s: Hinter ._replace_text_to_space (line , col_num, len ) abort
618617 let target = printf (' \%%%dc.' , a: col_num )
619618 let line = substitute (a: line , target, repeat (' ' , a: len ), ' ' )
620619 return line
@@ -790,3 +789,29 @@ function! s:throw(message) abort
790789 throw ' vital: HitAHint.Motion: ' . a: message
791790endfunction
792791
792+ " ___Revitalizer___
793+ " NOTE: below code is generated by :Revitalize.
794+ " Do not mofidify the code nor append new lines
795+ if v: version > 703 || v: version == 703 && has (' patch1170' )
796+ function ! s: ___revitalizer_function___ (fstr) abort
797+ return function (a: fstr )
798+ endfunction
799+ else
800+ function ! s: ___revitalizer_SID () abort
801+ return matchstr (expand (' <sfile>' ), ' <SNR>\zs\d\+\ze____revitalizer_SID$' )
802+ endfunction
803+ let s: ___revitalizer_sid = ' <SNR>' . s: ___revitalizer_SID () . ' _'
804+ function ! s: ___revitalizer_function___ (fstr) abort
805+ return function (substitute (a: fstr , ' s:' , s: ___revitalizer_sid , ' g' ))
806+ endfunction
807+ endif
808+
809+ let s:___revitalizer_functions___ = {'_vital_depends': s:___revitalizer_function___('s:_vital_depends'),'_vital_loaded': s:___revitalizer_function___('s:_vital_loaded'),'create_win2pos2hint': s:___revitalizer_function___('s:create_win2pos2hint'),'deepextend': s:___revitalizer_function___('s:deepextend'),'gather_poses': s:___revitalizer_function___('s:gather_poses'),'gather_visible_matched_poses': s:___revitalizer_function___('s:gather_visible_matched_poses'),'has_patch': s:___revitalizer_function___('s:has_patch'),'is_in_fold': s:___revitalizer_function___('s:is_in_fold'),'move': s:___revitalizer_function___('s:move'),'move_f': s:___revitalizer_function___('s:move_f'),'move_f2': s:___revitalizer_function___('s:move_f2'),'move_to_win': s:___revitalizer_function___('s:move_to_win'),'move_to_winpos': s:___revitalizer_function___('s:move_to_winpos'),'new_overwin': s:___revitalizer_function___('s:new_overwin'),'pos2hint_to_line2col2hint': s:___revitalizer_function___('s:pos2hint_to_line2col2hint'),'pos2poskey': s:___revitalizer_function___('s:pos2poskey'),'poskey2pos': s:___revitalizer_function___('s:poskey2pos'),'setline': s:___revitalizer_function___('s:setline'),'tab2spacelen': s:___revitalizer_function___('s:tab2spacelen'),'throw': s:___revitalizer_function___('s:throw'),'win2pos2hint_to_w2l2c2h': s:___revitalizer_function___('s:win2pos2hint_to_w2l2c2h'),'wincall': s:___revitalizer_function___('s:wincall'),'winnr2poses_to_list': s:___revitalizer_function___('s:winnr2poses_to_list')}
810+
811+ unlet ! s: ___revitalizer_sid
812+ delfunction s: ___revitalizer_function___
813+
814+ function ! vital#_easymotion#HitAHint#Motion#import () abort
815+ return s: ___revitalizer_functions___
816+ endfunction
817+ " ___Revitalizer___
0 commit comments