@@ -72,7 +72,7 @@ let s:overwin = {
72
72
\ ' cursor' : ' HitAHintCursor' ,
73
73
\ },
74
74
\ ' jump_first_target_keys' : [],
75
- \ ' do_shade' : s: TRUE ,
75
+ \ ' do_shade' : s: FALSE ,
76
76
\ }
77
77
\ }
78
78
@@ -539,11 +539,10 @@ function! s:Hinter._show_hint_for_line(winnr, lnum, col2hint) abort
539
539
let is_consecutive = cnum is # prev_cnum + 1
540
540
if ! is_consecutive
541
541
let col_num += next_offset
542
- else
543
- let save_next_offset = next_offset
544
542
endif
543
+ let save_next_offset = next_offset
545
544
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)
547
546
548
547
if is_consecutive
549
548
let col_offset += save_next_offset
@@ -570,7 +569,7 @@ endfunction
570
569
" depends on the col number of next hint in the same line, so it returns
571
570
" `next_offset` instead of returning offset all at once.
572
571
" @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
574
573
let line = a: line
575
574
let col_num = a: col_num
576
575
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
585
584
586
585
let offset = 0
587
586
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 )
589
588
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))
591
590
let offset = strdisplaywidth (target) - len (target)
592
591
else
593
592
if do_replace_target
@@ -602,19 +601,19 @@ function! s:Hinter._replace_line_for_hint(lnum, col_num, line, hint) abort
602
601
let next_offset = 0
603
602
if len (a: hint ) > 1 && target isnot # " \t "
604
603
" 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 , [' ' ])
606
605
endif
607
606
return [line , offset, next_offset]
608
607
endfunction
609
608
610
609
" @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
612
611
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)
614
613
return [line , space_len - 1 ]
615
614
endfunction
616
615
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
618
617
let target = printf (' \%%%dc.' , a: col_num )
619
618
let line = substitute (a: line , target, repeat (' ' , a: len ), ' ' )
620
619
return line
@@ -790,3 +789,29 @@ function! s:throw(message) abort
790
789
throw ' vital: HitAHint.Motion: ' . a: message
791
790
endfunction
792
791
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