LibGUI: Add word break locator methods to TextDocument

TextDocument now has utilities to locate a word break both before
and after any TextPosition.
This commit is contained in:
FalseHonesty 2020-05-23 18:40:14 -04:00 committed by Andreas Kling
commit a3bf8c72f3
Notes: sideshowbarker 2024-07-19 06:11:53 +09:00
2 changed files with 51 additions and 0 deletions

View file

@ -120,6 +120,9 @@ public:
Optional<TextDocumentSpan> first_non_skippable_span_before(const TextPosition&) const;
Optional<TextDocumentSpan> first_non_skippable_span_after(const TextPosition&) const;
TextPosition first_word_break_before(const TextPosition&) const;
TextPosition first_word_break_after(const TextPosition&) const;
void add_to_undo_stack(NonnullOwnPtr<TextDocumentUndoCommand>);
bool can_undo() const { return m_undo_stack.can_undo(); }