1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:07:43 +00:00

LibGUI: Update TextEditor to delete emoji based on gbp cluster

Updated TextDocument and TextEditor to use calls to
`find_grapheme_segmentation_boundary` in order to make "correct-feeling"
deletions on backspace and delete keys being pressed
This commit is contained in:
Fausto Tommasi 2023-02-15 07:49:01 -06:00 committed by Tim Flynn
parent 782b1d20f5
commit f7458b3e17
3 changed files with 37 additions and 0 deletions

View file

@ -102,6 +102,9 @@ public:
TextPosition next_position_after(TextPosition const&, SearchShouldWrap = SearchShouldWrap::Yes) const;
TextPosition previous_position_before(TextPosition const&, SearchShouldWrap = SearchShouldWrap::Yes) const;
size_t get_next_grapheme_cluster_boundary(TextPosition const& cursor) const;
size_t get_previous_grapheme_cluster_boundary(TextPosition const& cursor) const;
u32 code_point_at(TextPosition const&) const;
TextRange range_for_entire_line(size_t line_index) const;