@@ -6,7 +6,7 @@ let g:autoloaded_copilot = 1
66scriptencoding utf- 8
77
88let s: has_nvim_ghost_text = has (' nvim-0.6' ) && exists (' *nvim_buf_get_mark' )
9- let s: has_vim_ghost_text = has (' patch-9.0.0162 ' ) && has (' textprop' )
9+ let s: has_vim_ghost_text = has (' patch-9.0.0185 ' ) && has (' textprop' )
1010let s: has_ghost_text = s: has_nvim_ghost_text || s: has_vim_ghost_text
1111
1212let s: hlgroup = ' CopilotSuggestion'
@@ -374,10 +374,10 @@ function! s:UpdatePreview() abort
374374 else
375375 call prop_add (line (' .' ), col (' .' ), {' type' : s: hlgroup , ' text' : text[0 ]})
376376 for line in text[1 :]
377- call prop_add (line (' .' ), col ( ' . ' ) , {' type' : s: hlgroup , ' text_align' : ' below' , ' text' : line })
377+ call prop_add (line (' .' ), 0 , {' type' : s: hlgroup , ' text_align' : ' below' , ' text' : line })
378378 endfor
379379 if ! empty (annot)
380- call prop_add (line (' .' ), col (' $' ), {' type' : s: annot_hlgroup , ' text' : ' ' . annot[ 1 ][ 0 ] })
380+ call prop_add (line (' .' ), col (' $' ), {' type' : s: annot_hlgroup , ' text' : ' ' . annot})
381381 endif
382382 endif
383383 if uuid !=# get (s: , ' uuid' , ' ' )
@@ -656,33 +656,6 @@ function! s:commands.setup(opts) abort
656656
657657 let user = get (status, ' user' , ' <unknown>' )
658658
659- if status.status == # ' NoTelemetryConsent'
660- let terms_url = " https://github.co/copilot-telemetry-terms"
661- echo " I agree to these telemetry terms as part of the GitHub Copilot technical preview."
662- echo " <" . terms_url . " >"
663- let prompt = ' [a]gree/[r]efuse'
664- if len (browser)
665- let prompt .= ' /[o]pen in browser'
666- endif
667- while 1
668- let input = input (prompt . ' > ' )
669- if input = ~# ' ^r'
670- redraw
671- return ' echoerr ' . string (' Copilot: Terms must be accepted.' )
672- elseif input = ~# ' ^[ob]' && len (browser)
673- if copilot#job#Stream (browser + [terms_url], v: null , v: null ) != 0
674- echo " \n Could not open browser."
675- endif
676- elseif input = ~# ' ^a'
677- break
678- else
679- echo " \n Unrecognized response."
680- endif
681- endwhile
682- redraw
683- call copilot#Call (' recordTelemetryConsent' , {})
684- endif
685-
686659 echo ' Copilot: Authenticated as GitHub user ' . user
687660endfunction
688661
0 commit comments