Skip to content

Commit a8142d4

Browse files
committed
Copilot.vim 1.16.0
1 parent 49e0348 commit a8142d4

File tree

6 files changed

+220
-220
lines changed

6 files changed

+220
-220
lines changed

autoload/copilot.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ function! s:UpdatePreview() abort
343343
call s:ClearPreview()
344344
if s:has_nvim_ghost_text
345345
let data = {'id': 1}
346-
let data.virt_text_win_col = virtcol('.') - 1
346+
let data.virt_text_pos = 'overlay'
347347
let append = strpart(getline('.'), col('.') - 1 + delete)
348348
let data.virt_text = [[text[0] . append . repeat(' ', delete - len(text[0])), s:hlgroup]]
349349
if len(text) > 1

autoload/copilot/agent.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ function! copilot#agent#LspResponse(agent_id, opts, ...) abort
337337
endfunction
338338

339339
function! s:LspRequest(method, params, ...) dict abort
340-
let id = v:lua.require'_copilot'.lsp_request(self.id, a:method, a:params)
340+
let id = eval("v:lua.require'_copilot'.lsp_request(self.id, a:method, a:params)")
341341
if id isnot# v:null
342342
return call('s:SetUpRequest', [self, id, a:method, a:params] + a:000)
343343
endif
@@ -355,7 +355,7 @@ function! s:LspClose() dict abort
355355
endfunction
356356

357357
function! s:LspNotify(method, params) dict abort
358-
return v:lua.require'_copilot'.rpc_notify(self.id, a:method, a:params)
358+
return eval("v:lua.require'_copilot'.rpc_notify(self.id, a:method, a:params)")
359359
endfunction
360360

361361
function! copilot#agent#LspHandle(agent_id, request) abort
@@ -526,7 +526,7 @@ function! copilot#agent#New(...) abort
526526
\ 'Close': function('s:LspClose'),
527527
\ 'Notify': function('s:LspNotify'),
528528
\ 'Request': function('s:LspRequest')})
529-
let instance.client_id = v:lua.require'_copilot'.lsp_start_client(command, keys(instance.methods))
529+
let instance.client_id = eval("v:lua.require'_copilot'.lsp_start_client(command, keys(instance.methods))")
530530
let instance.id = instance.client_id
531531
else
532532
let state = {'headers': {}, 'mode': 'headers', 'buffer': ''}

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.15.0'
2+
return '1.16.0'
33
endfunction

dist/agent.js

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

dist/agent.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.

plugin/copilot.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ if !get(g:, 'copilot_no_maps')
8181
if !has('nvim') && &encoding ==# 'utf-8'
8282
" avoid 8-bit meta collision with UTF-8 characters
8383
let s:restore_encoding = 1
84-
set encoding=cp949
84+
silent noautocmd set encoding=cp949
8585
endif
8686
if empty(mapcheck('<M-]>', 'i'))
8787
imap <M-]> <Plug>(copilot-next)
@@ -100,7 +100,7 @@ if !get(g:, 'copilot_no_maps')
100100
endif
101101
finally
102102
if exists('s:restore_encoding')
103-
set encoding=utf-8
103+
silent noautocmd set encoding=utf-8
104104
endif
105105
endtry
106106
endif

0 commit comments

Comments
 (0)