zbirenbaum / copilot.lua

Fully featured & enhanced replacement for copilot.vim complete with API for interacting with Github Copilot
MIT License
2.43k stars 65 forks source link

Put cursor at end of accepted multi-line suggestion #216

Closed b0o closed 8 months ago

b0o commented 8 months ago

I'm not sure if this is a bug or the intended behavior, but when I accept a multi-line suggestion, the cursor is placed at the end of the current line, rather than the end of the inserted suggestion. This is especially annoying when the suggestion is missing the closing paren/bracket, as in the gif below.

Is this intended? If so, is there a way to change the behavior? VSCode behaves in the way I would expect.

2023-10-11_15-18-20_Alacritty

MunifTanjim commented 8 months ago

I think something broke recently. This used to work as expected before.

MunifTanjim commented 8 months ago

@b0o can you please share the output of :Copilot version?

b0o commented 8 months ago

Sure:

Neovim 0.10.0-dev-1324+gc3d21ad1bc
copilot.vim 1.10.3
copilot.lua 1a8032ae496916ccc7a7a52ee79194fbef29f462
copilot/dist/agent.js 1.110.389
Node.js 20.6.1
MunifTanjim commented 8 months ago

This is probably caused by https://github.com/neovim/neovim/pull/24901

Discussion: https://github.com/neovim/neovim/discussions/25883