Skip to content

Fix CodeEdit hover word lookup #106919

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

Merged
merged 1 commit into from
Jun 18, 2025

Conversation

kitbdev
Copy link
Contributor

@kitbdev kitbdev commented May 28, 2025

Fixes hovering to show tooltip when over the end of the last character of a symbol (where clicking would place the caret at the end).
This should be useful for cases like godotengine/godot-proposals#11365 and #102380, since selecting the entire word puts the caret at the last character.

Unifies the word detection behavior to the one that the rest of the TextEdit uses.
This fixes hovering to show tooltip not working correctly when next to unicode word break characters. Custom word separators are now respected too.
Removed the old word detection function.

Moves the string detection logic to use CodeEdit's delimiter system. Though this means it won't work in comments anymore.

Also made the tooltip hover work when text is selected. There shouldn't be any problem with allowing this, since the tooltip doesn't show if mouse buttons are held. Related: godotengine/godot-proposals#12492

@kitbdev kitbdev added this to the 4.5 milestone May 28, 2025
@kitbdev kitbdev requested review from a team as code owners May 28, 2025 23:05
@kitbdev kitbdev added the bug label May 28, 2025
@kitbdev kitbdev requested a review from a team as a code owner May 28, 2025 23:05
@kitbdev kitbdev marked this pull request as draft May 28, 2025 23:23
@kitbdev kitbdev marked this pull request as ready for review May 28, 2025 23:55
Copy link
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Core wise, moving a domain specific function out of core is always welcome :)

@Repiteo Repiteo merged commit d4fa7e1 into godotengine:master Jun 18, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Jun 18, 2025

Thanks!

@kitbdev kitbdev deleted the fix-codeedit-hover-word-lookup branch June 19, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hovering while holding control over a path with spaces doesn't always recognize the path
4 participants