Skip to content

Commit 25f7397

Browse files
committed
Copilot.vim 1.38.0
1 parent 0668308 commit 25f7397

File tree

4 files changed

+398
-428
lines changed

4 files changed

+398
-428
lines changed

‎autoload/copilot.vim‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,26 @@ function! s:UpdatePreview() abort
353353
let data.hl_mode ='combine'
354354
callnvim_buf_set_extmark(0, copilot#NvimNs(), line('.')-1, col('.')-1, data)
355355
elseifs:has_vim_ghost_text
356-
callprop_add(line('.'), col('.'),{'type': s:hlgroup, 'text': text[0]})
356+
let new_suffix = text[0]
357+
let current_suffix =getline('.')[col('.') -1 :]
358+
let inset =''
359+
whiledelete > 0&&!empty(new_suffix)
360+
let last_char =matchstr(new_suffix, '.$')
361+
let new_suffix =matchstr(new_suffix, '^.\{-\}\ze.$')
362+
if last_char ==# matchstr(current_suffix, '.$')
363+
if!empty(inset)
364+
callprop_add(line('.'), col('.') +len(current_suffix),{'type': s:hlgroup, 'text': inset})
365+
let inset =''
366+
endif
367+
let current_suffix =matchstr(current_suffix, '^.\{-\}\ze.$')
368+
letdelete-=1
369+
else
370+
let inset = last_char . inset
371+
endif
372+
endwhile
373+
if!empty(new_suffix . inset)
374+
callprop_add(line('.'), col('.'),{'type': s:hlgroup, 'text': new_suffix . inset})
375+
endif
357376
forlinein text[1:]
358377
callprop_add(line('.'), 0,{'type': s:hlgroup, 'text_align': 'below', 'text': line})
359378
endfor

‎autoload/copilot/version.vim‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
function!copilot#version#String() abort
2-
return'1.37.0'
2+
return'1.38.0'
33
endfunction

‎dist/language-server.js‎

Lines changed: 374 additions & 423 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/language-server.js.map‎

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
(0)