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

Treat punctuation as words and as word separators #93870

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kitbdev
Copy link
Contributor

@kitbdev kitbdev commented Jul 2, 2024

Treat punctuation as words and word separators.
This affects behavior in TextEdit, LineEdit, and RichTextLabel for word selection and operations.

Changed a test for ui_text_backspace_word since a period after a word is now separate and won't be removed together. This matches the behavior of other editors.

@kitbdev kitbdev requested review from a team as code owners July 2, 2024 18:24
@bruvzg bruvzg self-requested a review July 2, 2024 18:26
@AThousandShips AThousandShips added this to the 4.x milestone Jul 3, 2024
@vgezer
Copy link
Contributor

vgezer commented Jul 14, 2024

Thanks for noticing and fixing this. Also for the tests :)

@kitbdev
Copy link
Contributor Author

kitbdev commented Aug 26, 2024

It looks like adding just text_edit->set_text(U"👏👏👏 👏👏"); in a test will cause a leak. See https://github.com/kitbdev/godot/actions/runs/10563094361/job/29262539610#step:17:643 for this commit kitbdev@7653fb6.

I guess TextEdit isn't properly cleaning up when it gets deleted?

@bruvzg
Copy link
Member

bruvzg commented Aug 26, 2024

It looks like adding just text_edit->set_text(U"👏👏👏 👏👏"); in a test will cause a leak.

Are you referring to /lib/x86_64-linux-gnu/libfontconfig.so.1+ leak? This is an issue with the external library (👏 is not part of the editor fonts, so it's trying to load system font as fallback). The library is not part of Godot but part of Linux distro, so I'm not sure if we can do anything with it. Probably should be ignored, or we can add a subset of emoji font specifically for tests.

@kitbdev
Copy link
Contributor Author

kitbdev commented Aug 26, 2024

Thanks! I can remove the emoji test for now, it's not that important for this pr.

@kitbdev
Copy link
Contributor Author

kitbdev commented Aug 28, 2024

The other languages I was using were also causing issues, so I removed that test from this PR.

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.

Inconsistent editor movement near arithmetic operators
4 participants