llama.vim : fix repetitions [no ci]
This commit is contained in:
parent
ae76a092b8
commit
9f8fa900f6
1 changed files with 5 additions and 0 deletions
|
@ -499,6 +499,11 @@ function! s:fim_on_stdout(job_id, data, event) dict
|
|||
let s:pos_dx = len(s:content[-1])
|
||||
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()
|
||||
|
||||
" display virtual text with the suggestion
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue