-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cursor position error #200
Comments
It seems that this happens when the first character of the completion is a newline and the code is attempting to set the cursor property on the newline character. 🤔 |
Is this the same issue reported with Typescript? #165 I often have issues with the cursor jumping in TS files, but that issue was closed as stale a while back. |
I still have the same problem on latest master so upvoted this issue. |
I'll look into this! |
If it helps, here’s another reproduction of the issue that happens for me all the time. Here after output.mp4 |
Same here, with typescript-mode (happens without lsp-mode / eglot). Colons, parentheses, braces are all affected. |
It happens in python model as well, that sometimes the cursor is placed at the end of the suggestion instead of the beginning. E.g. in the following image the last character input by my was ":", the rest was filled in by copilot and the cursor is shown at the end of the suggestion, instead of the beginning: |
I'm also experiencing this in Python. |
Correct for indentation after accepting a completion rather than during typing. This is less confusing than being impeded while typing spaces or tabs on a new line while there is completion preview, and behaves more like VSCode. Fixes copilot-emacs#28 and copilot-emacs#200.
Correct for indentation after accepting a completion rather than during typing. This is less confusing than being impeded while typing spaces or tabs on a new line while there is completion preview, and behaves more like VSCode. Fixes #28 and #200. Co-authored-by: Alexis Asseman <[email protected]>
Correct for indentation after accepting a completion rather than during typing. This is less confusing than being impeded while typing spaces or tabs on a new line while there is completion preview, and behaves more like VSCode. Fixes copilot-emacs#28 and copilot-emacs#200. Co-authored-by: Alexis Asseman <[email protected]>
When the real cursor position is not at the start of the overlay preview. The cursor will jump to the end of the overlay.
For example:
![copilot_bug](https://private-user-images.githubusercontent.com/88721906/282269120-7174513e-3188-4560-bbd0-4857da109f3a.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDc0ODAsIm5iZiI6MTczOTQ0NzE4MCwicGF0aCI6Ii84ODcyMTkwNi8yODIyNjkxMjAtNzE3NDUxM2UtMzE4OC00NTYwLWJiZDAtNDg1N2RhMTA5ZjNhLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDExNDYyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQyOWFjZDc5MDYxNjM3NjU2YTI0MjliNzUxOTg3NjVjZjgwNmU5NGU1ZTI1YWY3YThmNWFmNmVjNzY5ZGUzOGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.3mGdmjiEIH41Jq9WdYioFnTV8XZft9i6C7dK8tyQ5QY)
the cursor will keep jumping to the end of the overlay.
Another similar situation:
![another_bug](https://private-user-images.githubusercontent.com/88721906/282269144-1fe932eb-60e6-4fae-ac92-3b6c5e058ab8.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDc0ODAsIm5iZiI6MTczOTQ0NzE4MCwicGF0aCI6Ii84ODcyMTkwNi8yODIyNjkxNDQtMWZlOTMyZWItNjBlNi00ZmFlLWFjOTItM2I2YzVlMDU4YWI4LmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDExNDYyMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNiYjUyYjY4M2MwOGQ1Y2ZjYzU5YTU3N2M1ZjZkOWQ1YjA3NWFiZDVkNjI0Mjc5YzVlMTRmOThlNjU0ZTM1NTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.rm3K4KReTdVEIssyHeh8KpmT-JINsQDIh-oQxz_DxAM)
the cursor's real position is after :, but it will jump to the end of the completion.
To reproduce:
The text was updated successfully, but these errors were encountered: