From fd8a310c327576452221c271ebc6029329204f69 Mon Sep 17 00:00:00 2001 From: mohamed Date: Tue, 11 Jun 2024 18:00:06 -0600 Subject: [PATCH 1/3] merge latest --- autoload/copilot.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autoload/copilot.vim b/autoload/copilot.vim index a7710694..3a6e9e23 100644 --- a/autoload/copilot.vim +++ b/autoload/copilot.vim @@ -236,9 +236,11 @@ function! s:SuggestionTextWithAdjustments() abort let leading = matchstr(choice_text, '^\s\+') let unindented = strpart(choice_text, len(leading)) if strpart(typed, 0, len(leading)) == leading && unindented !=# delete + let g:copilot_comp_text_latest = unindented return [unindented, len(typed) - len(leading), strchars(delete), choice] endif elseif typed ==# strpart(choice_text, 0, offset) + let g:copilot_comp_text_latest = strpart(choice_text, offset) return [strpart(choice_text, offset), 0, strchars(delete), choice] endif catch From e4d88cb74900d23139096ad29ffc3db442e1fd55 Mon Sep 17 00:00:00 2001 From: mohamed Date: Tue, 19 Sep 2023 09:06:24 -0600 Subject: [PATCH 2/3] monkey patch --- autoload/copilot.vim | 2 -- 1 file changed, 2 deletions(-) diff --git a/autoload/copilot.vim b/autoload/copilot.vim index 3a6e9e23..a7710694 100644 --- a/autoload/copilot.vim +++ b/autoload/copilot.vim @@ -236,11 +236,9 @@ function! s:SuggestionTextWithAdjustments() abort let leading = matchstr(choice_text, '^\s\+') let unindented = strpart(choice_text, len(leading)) if strpart(typed, 0, len(leading)) == leading && unindented !=# delete - let g:copilot_comp_text_latest = unindented return [unindented, len(typed) - len(leading), strchars(delete), choice] endif elseif typed ==# strpart(choice_text, 0, offset) - let g:copilot_comp_text_latest = strpart(choice_text, offset) return [strpart(choice_text, offset), 0, strchars(delete), choice] endif catch From 40363a1f9ab43bbaacd323373f15f3a1873910e6 Mon Sep 17 00:00:00 2001 From: mohamed Date: Tue, 11 Jun 2024 18:04:53 -0600 Subject: [PATCH 3/3] fix rebase --- autoload/copilot.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autoload/copilot.vim b/autoload/copilot.vim index a7710694..a4dacedd 100644 --- a/autoload/copilot.vim +++ b/autoload/copilot.vim @@ -236,9 +236,11 @@ function! s:SuggestionTextWithAdjustments() abort let leading = matchstr(choice_text, '^\s\+') let unindented = strpart(choice_text, len(leading)) if strpart(typed, 0, len(leading)) == leading && unindented !=# delete + let g:copilot_comp_text_latest = unindented return [unindented, len(typed) - len(leading), strchars(delete), choice] endif elseif typed ==# strpart(choice_text, 0, offset) + let g:copilot_comp_text_latest = strpart(choice_text, offset) return [strpart(choice_text, offset), 0, strchars(delete), choice] endif catch