diff options
author | Fausto Tommasi <fgtommasi@gmail.com> | 2023-02-15 07:49:01 -0600 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-02-17 07:50:09 -0500 |
commit | f7458b3e177fe847113e20b202e6c667a23f6b42 (patch) | |
tree | 3b7d59caf153f7c87781f4acabb331060f017024 /Userland/Libraries/LibGUI/TextDocument.h | |
parent | 782b1d20f5e5f14c7107be2942a2ac00747a8e65 (diff) | |
download | serenity-f7458b3e177fe847113e20b202e6c667a23f6b42.zip |
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
Diffstat (limited to 'Userland/Libraries/LibGUI/TextDocument.h')
-rw-r--r-- | Userland/Libraries/LibGUI/TextDocument.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/TextDocument.h b/Userland/Libraries/LibGUI/TextDocument.h index 3bae9594fa..48c1452055 100644 --- a/Userland/Libraries/LibGUI/TextDocument.h +++ b/Userland/Libraries/LibGUI/TextDocument.h @@ -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; |