From f7458b3e177fe847113e20b202e6c667a23f6b42 Mon Sep 17 00:00:00 2001 From: Fausto Tommasi Date: Wed, 15 Feb 2023 07:49:01 -0600 Subject: 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 --- Userland/Libraries/LibGUI/TextDocument.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Userland/Libraries/LibGUI/TextDocument.h') 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; -- cgit v1.2.3