From 9f8fa900f68ece27185e6c0ac9690a2a5b251cbd Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sun, 13 Oct 2024 21:56:29 +0300 Subject: [PATCH] llama.vim : fix repetitions [no ci] --- examples/llama.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/llama.vim b/examples/llama.vim index 919055876..0065d5e5a 100644 --- a/examples/llama.vim +++ b/examples/llama.vim @@ -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