-
-
Notifications
You must be signed in to change notification settings - Fork 18.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
get_visible_line_count()
in RichTextLabel is wrong if text contains newlines
#59359
Comments
Hi! I'd like to submit a solution. I've removed the code that, if a newline was encountered, would treat the whole line as empty. Possibly there are other dependencies for that calculation that I'm not currently aware of, in which case I'll update my PR. |
Fixed by #59765. |
akien-mga
pushed a commit
to akien-mga/godot
that referenced
this issue
Dec 12, 2022
Fixed godotengine#59359. (cherry picked from commit 32cdf9f)
Deozaan
pushed a commit
to Deozaan/godot
that referenced
this issue
Jan 6, 2023
Riordan-DC
pushed a commit
to Riordan-DC/godot
that referenced
this issue
Jan 23, 2023
Riordan-DC
pushed a commit
to Riordan-DC/godot
that referenced
this issue
Jan 24, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Godot version
3.5 beta2
System information
Windows 10 x64
Issue description
When text contains newlines,
get_visible_line_count()
is off by the number of newlines. I use this code to automatically scroll the RTL:To the left is text with single, autowrapped line. To the right is text with one newline. The visible line count starts from 0 and is 1 too low.
Does not happen on master.
Steps to reproduce
visible_characters
get_visible_line_count()
Minimal reproduction project
ReproductionProject.zip
The text was updated successfully, but these errors were encountered: