Skip to content
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

autocompletion puts the cursor in the wrong place #6232

Closed
eulerdisk opened this issue Mar 9, 2023 · 5 comments · Fixed by #5728
Closed

autocompletion puts the cursor in the wrong place #6232

eulerdisk opened this issue Mar 9, 2023 · 5 comments · Fixed by #5728
Labels
A-helix-term Area: Helix term improvements A-language-server Area: Language server client C-bug Category: This is a bug

Comments

@eulerdisk
Copy link

eulerdisk commented Mar 9, 2023

Summary

I think the new snippet based autocompletion has problems.
It put the cursor in the wrong place.
It seems to me it puts the cursor at the selection starting point. Is that the desired behavior?

See the asccinema.

Reproduction Steps

https://asciinema.org/a/RKvDTNf8i22Ufz2MBZlawshzI

Helix log

No response

Platform

WSL

Terminal Emulator

Windows Terminal

Helix Version

helix 22.12 (39d5fb0)

@eulerdisk eulerdisk added the C-bug Category: This is a bug label Mar 9, 2023
@eulerdisk eulerdisk changed the title autocompletion put the cursor in the wrong place autocompletion puts the cursor in the wrong place Mar 9, 2023
@archseer
Copy link
Member

archseer commented Mar 9, 2023

Fix is included in #5728 I think

@archseer archseer linked a pull request Mar 9, 2023 that will close this issue
@kirawi kirawi added A-language-server Area: Language server client A-helix-term Area: Helix term improvements labels Mar 9, 2023
@eulerdisk
Copy link
Author

eulerdisk commented Mar 9, 2023

Fix is included in #5728 I think

👍 Almost.
The cursor is not place inside parenthesis if the auto-completed function has arguments.

@pascalkuthe
Copy link
Member

This is indeed fixed by #5728, I can't reproduce the problem you mentinoed but I have some local fixes so it might be related to that

@eulerdisk
Copy link
Author

eulerdisk commented Mar 10, 2023

This is indeed fixed by #5728, I can't reproduce the problem you mentinoned but I have some local fixes so it might be related to that

Nope. Cursor position is still going places randomly.
It's hard to reproduce though and it's a different problem than before.

@pascalkuthe
Copy link
Member

This is indeed fixed by #5728, I can't reproduce the problem you mentinoned but I have some local fixes so it might be related to that

Nope. Cursor position is still going places randomly. It's hard to reproduce though and it's a different problem than before.

I tried the reproduction case you showed above and it works just fine now. I have spent a lot of time debugging this and I am fairly certain the cursor positioning should be correct now. Did you use the final version of that PR after it was merged (or in other words latest master)? I did a lot of additional work on that PR yesterday so it's possible you got an old version of that PR.

If you have found a different bug please open a new separate bug report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements A-language-server Area: Language server client C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants