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

RichTextLabel: Ensure the select_all function selects all items #79818

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

garychia
Copy link
Contributor

Fixes #79670

Two problems found in the select_all function:

  1. select_all uses char_count in the cache without ensuring the cache is valid.
  2. to_item is not set when the first item is found. This will be a problem when there is only one item to select.

@garychia garychia requested a review from a team as a code owner July 23, 2023 10:41
@Sauermann Sauermann added this to the 4.2 milestone Jul 23, 2023
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

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

Fixes the issue.

@KoBeWi KoBeWi requested a review from bruvzg August 15, 2023 07:12
@akien-mga akien-mga changed the title Ensure the 'select_all' function selects all items Ensure the select_all function selects all items Aug 15, 2023
@akien-mga akien-mga changed the title Ensure the select_all function selects all items RichTextLabel: Ensure the select_all function selects all items Aug 15, 2023
@YuriSizov
Copy link
Contributor

Would you mind rebasing your PR against the current master?

@akien-mga akien-mga merged commit b00796e into godotengine:master Aug 28, 2023
@akien-mga
Copy link
Member

Thanks!

@garychia garychia deleted the select_all branch August 28, 2023 12:49
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.

RichTextLabel select_all method has no visual indicator
6 participants