Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
vim ghost text rendering now uses pos_x and pos_y parameters
  • Loading branch information
m18coppola committed Oct 22, 2024
commit 5292d45f99b45bb9add781592ba3354f6229318c
6 changes: 3 additions & 3 deletions examples/llama.vim
Original file line number Diff line number Diff line change
Expand Up @@ -744,21 +744,21 @@ function! s:fim_on_stdout(pos_x, pos_y, is_auto, job_id, data, event = v:null)
elseif s:vim_ghost_text
let l:new_suffix = s:content[0]
if !empty(l:new_suffix)
call prop_add(line('.'), col('.'), {
call prop_add(s:pos_y, s:pos_x + 1, {
\ 'type': s:hint_hlgroup,
\ 'text': l:new_suffix
\ })
endif
for line in s:content[1:]
call prop_add(line('.'), 0, {
call prop_add(s:pos_y, 0, {
\ 'type': s:hint_hlgroup,
\ 'text': line,
\ 'text_padding_left': s:get_indent(line),
\ 'text_align': 'below'
\ })
endfor
if !empty(l:info)
call prop_add(line('.'), 0, {
call prop_add(s:pos_y, 0, {
\ 'type': s:info_hlgroup,
\ 'text': ' ' . l:info,
\ 'text_padding_left': col('$'),
Expand Down