llama.vim : fix repetitions [no ci]

This commit is contained in:
Georgi Gerganov 2024-10-13 21:56:29 +03:00
parent ae76a092b8
commit 9f8fa900f6
No known key found for this signature in database
GPG key ID: BF970631944C16B7

View file

@ -499,6 +499,11 @@ function! s:fim_on_stdout(job_id, data, event) dict
let s:pos_dx = len(s:content[-1]) let s:pos_dx = len(s:content[-1])
let s:content[-1] .= s:line_cur_suffix let s:content[-1] .= s:line_cur_suffix
" truncate the suggestion if it repeats the next line
if len(s:content) > 1 && s:content[1] == getline(s:pos_y + 1)
let s:content = [s:content[0]]
endif
call llama#fim_cancel() call llama#fim_cancel()
" display virtual text with the suggestion " display virtual text with the suggestion