From 9b0cb60d8547ce51d48a0762f67e4b149c8e0c70 Mon Sep 17 00:00:00 2001 From: qiqiboy Date: Sat, 27 Aug 2022 09:27:19 +0800 Subject: [PATCH 1/2] fix: Fix multi-line virtual text preview --- autoload/copilot.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/copilot.vim b/autoload/copilot.vim index 8e4b5c36..b145de04 100644 --- a/autoload/copilot.vim +++ b/autoload/copilot.vim @@ -374,7 +374,7 @@ function! s:UpdatePreview() abort else call prop_add(line('.'), col('.'), {'type': s:hlgroup, 'text': text[0]}) for line in text[1:] - call prop_add(line('.'), col('.'), {'type': s:hlgroup, 'text_align': 'below', 'text': line}) + call prop_add(line('.'), 0, {'type': s:hlgroup, 'text_align': 'below', 'text': line}) endfor if !empty(annot) call prop_add(line('.'), col('$'), {'type': s:annot_hlgroup, 'text': ' ' . annot[1][0]}) From e04d1331f90c6fb258517f3a371342fa7ccf767f Mon Sep 17 00:00:00 2001 From: qiqiboy Date: Mon, 29 Aug 2022 11:17:01 +0800 Subject: [PATCH 2/2] chore: update EOL annot --- autoload/copilot.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/copilot.vim b/autoload/copilot.vim index b145de04..d5518c16 100644 --- a/autoload/copilot.vim +++ b/autoload/copilot.vim @@ -377,7 +377,7 @@ function! s:UpdatePreview() abort call prop_add(line('.'), 0, {'type': s:hlgroup, 'text_align': 'below', 'text': line}) endfor if !empty(annot) - call prop_add(line('.'), col('$'), {'type': s:annot_hlgroup, 'text': ' ' . annot[1][0]}) + call prop_add(line('.'), col('$'), {'type': s:annot_hlgroup, 'text': ' ' . annot}) endif endif if uuid !=# get(s:, 'uuid', '')