Skip to content

Commit 39c3cd4

Browse files
committed
removed unused code
1 parent b81721b commit 39c3cd4

File tree

1 file changed

+3
-23
lines changed

1 file changed

+3
-23
lines changed

examples/llama.vim

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -742,37 +742,17 @@ function! s:fim_on_stdout(pos_x, pos_y, is_auto, job_id, data, event = 0)
742742
\ 'virt_text_win_col': virtcol('.')
743743
\ })
744744
elseif s:vim_ghost_text
745-
" adapted from:
746-
" https://github.com/github/copilot.vim/blob/release/autoload/copilot.vim
747745
let l:new_suffix = s:content[0]
748-
let l:current_suffix = getline('.')[col('.') - 1 :]
749-
let l:inset = ''
750-
while !empty(l:new_suffix)
751-
let last_char = matchstr(l:new_suffix, '.$')
752-
let l:new_suffix = matchstr(l:new_suffix, '^.\{-\}\ze.$')
753-
if last_char ==# matchstr(l:current_suffix, '.$')
754-
if !empty(l:inset)
755-
call prop_add(line('.'), col('.') + len(l:current_suffix), {
756-
\ 'type': s:hlgroup,
757-
\ 'text': l:inset
758-
\ })
759-
let l:inset = ''
760-
endif
761-
let l:current_suffix = matchstr(l:current_suffix, '^.\{-\}\ze.$')
762-
else
763-
let l:inset = last_char . l:inset
764-
endif
765-
endwhile
766-
if !empty(l:new_suffix . l:inset)
746+
if !empty(l:new_suffix)
767747
call prop_add(line('.'), col('.'), {
768748
\ 'type': s:hint_hlgroup,
769-
\ 'text': l:new_suffix . l:inset
749+
\ 'text': l:new_suffix
770750
\ })
771751
endif
772752
for line in s:content[1:]
773753
call prop_add(line('.'), 0, {
774754
\ 'type': s:hint_hlgroup,
775-
\ 'text': l:new_suffix . line,
755+
\ 'text': line,
776756
\ 'text_padding_left': s:get_indent(line),
777757
\ 'text_align': 'below'
778758
\ })

0 commit comments

Comments
 (0)