-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Cancel code completion and code hint upon go-to line (bookmark, breakpoint, etc.) #97674
Cancel code completion and code hint upon go-to line (bookmark, breakpoint, etc.) #97674
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can confirm that this fixes the linked issue. Code looks straight forward.
This works for the linked issue, but there are more places where the code hint and code completion need to be hidden. Ideally CodeEdit should respond to all caret movements and cancel it when needed there instead of needing to cancel it in each of these separately. This can be done in another PR if we want to merge this one as is. |
I thought I was merging this but it seems I missed it in my batch. Good timing as kleonc had some comments :D |
I'd say adjusting the search bar behavior here would make sense. A more general solution on CodeEdit level sounds great, but it might get complicated to generalize the decision whether the hint needs to be canceled and when it needs to be updated by querying the ScriptLanguage (e.g. when moving the cursor inside the same call we would need to update the hint, not cancel it, to highlight the correct current argument). Querying too often might also have performance implications for GDScript at the moment, due to the lack of caching. So merging this as a simple fix for now would make sense to me. |
46bdd18
to
b72d8a3
Compare
Alright, updated to clear when using "Go to Line..." and when finding a successful search in the search bar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The search bar adjustment works as well. As said before I think merging this fix is a good idea since a generalized fix on CodeEdit
level may pose some challenges at the moment.
Thanks! And congrats for your first merged Godot contribution 🎉 |
Fixes #95056.
When doing an action that does a "go-to line" such as
Go to Next/Previous Breakpoint
orGo to Next/Previous Bookmark
, this ensures the code hint or currently open code completion is cleared when jumping lines.