-
-
Notifications
You must be signed in to change notification settings - Fork 812
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
text: Improve accuracy and performance of caret placement in text #18446
text: Improve accuracy and performance of caret placement in text #18446
Commits on Nov 4, 2024
-
text: Fix gutter translation in screen_position_to_index
When transforming TextField local coordinates to layout coordinates, we want to subtract the gutter, not add it. This fixes the weird 4px constant translation when selecting text.
Configuration menu - View commit details
-
Copy full SHA for d445167 - Browse repository at this point
Copy the full SHA d445167View commit details -
text: Add Layout::find_line_index_by_y
This method allows finding lines by their y coordinates with binary search.
Configuration menu - View commit details
-
Copy full SHA for 840f004 - Browse repository at this point
Copy the full SHA 840f004View commit details -
text: Use binary search for finding lines in screen_position_to_index
This simplifies code a lot and makes it more performant.
Configuration menu - View commit details
-
Copy full SHA for d7711a9 - Browse repository at this point
Copy the full SHA d7711a9View commit details -
tests: Add text_caret_placement_leading test
This test verifies how the caret is placed in text with different leadings.
Configuration menu - View commit details
-
Copy full SHA for 6ce2bb6 - Browse repository at this point
Copy the full SHA 6ce2bb6View commit details -
tests: Add text_caret_placement_align test
This test verifies how caret placement works depending on the align.
Configuration menu - View commit details
-
Copy full SHA for 7cafd9d - Browse repository at this point
Copy the full SHA 7cafd9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ba43577 - Browse repository at this point
Copy the full SHA ba43577View commit details -
tests: Add text_caret_placement_translated_bounds test
This test verifies how the caret placement works when bounds do not start with 0,0.
Configuration menu - View commit details
-
Copy full SHA for 61d0873 - Browse repository at this point
Copy the full SHA 61d0873View commit details -
tests: Add text_caret_placement_scroll test
This test verifies how the caret placement works with non-zero vertical and horizontal scroll.
Configuration menu - View commit details
-
Copy full SHA for f4a15fd - Browse repository at this point
Copy the full SHA f4a15fdView commit details