summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/TextDocument.h
diff options
context:
space:
mode:
authorFausto Tommasi <fgtommasi@gmail.com>2023-02-15 07:49:01 -0600
committerTim Flynn <trflynn89@pm.me>2023-02-17 07:50:09 -0500
commitf7458b3e177fe847113e20b202e6c667a23f6b42 (patch)
tree3b7d59caf153f7c87781f4acabb331060f017024 /Userland/Libraries/LibGUI/TextDocument.h
parent782b1d20f5e5f14c7107be2942a2ac00747a8e65 (diff)
downloadserenity-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.h3
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;