mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-23 17:49:57 +08:00
fix(highlight.vim): fix list index out of range
This commit is contained in:
parent
561da4ffbd
commit
0f336f386e
@ -309,7 +309,9 @@ function! s:highlight() abort
|
|||||||
for item in s:stack
|
for item in s:stack
|
||||||
call add(s:highlight_id, s:CMP.matchaddpos('HiBlueBold', [ item ]))
|
call add(s:highlight_id, s:CMP.matchaddpos('HiBlueBold', [ item ]))
|
||||||
endfor
|
endfor
|
||||||
let s:highlight_id_c = s:CMP.matchaddpos('HiPurpleBold', [s:stack[s:index]])
|
if !empty(get(s:stack, s:index, []))
|
||||||
|
let s:highlight_id_c = s:CMP.matchaddpos('HiPurpleBold', [s:stack[s:index]])
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ Given (fixture):
|
|||||||
Hello
|
Hello
|
||||||
Hello
|
Hello
|
||||||
|
|
||||||
Execute ( SpaceVim plugin: iedit ):
|
Execute ( SpaceVim plugin: highlight.vim `SPC s h/H` ):
|
||||||
let g:_spacevim_input_list = ['e', 'D', 'a', 'W', 'o', 'r', 'l', 'd', "\<Esc>", "\<Esc>"]
|
let g:_spacevim_input_list = ['e', 'D', 'a', 'W', 'o', 'r', 'l', 'd', "\<Esc>", "\<Esc>"]
|
||||||
call SpaceVim#plugins#highlight#start()
|
call SpaceVim#plugins#highlight#start()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user