summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/TextDocument.h
diff options
context:
space:
mode:
authorItamar <itamar8910@gmail.com>2021-03-19 12:57:30 +0200
committerAndreas Kling <kling@serenityos.org>2021-03-21 09:46:21 +0100
commit3cc7b00e2400d851fa38ca3d107a796ef97d52f8 (patch)
tree3f8e0490d6d1f50b29367c79964373078331df67 /Userland/Libraries/LibGUI/TextDocument.h
parentf8c603fe7ef142ed64fedb6c79a0de44f8f2dcd2 (diff)
downloadserenity-3cc7b00e2400d851fa38ca3d107a796ef97d52f8.zip
LibGUI: Allow TextDocument::set_text to fail
Diffstat (limited to 'Userland/Libraries/LibGUI/TextDocument.h')
-rw-r--r--Userland/Libraries/LibGUI/TextDocument.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibGUI/TextDocument.h b/Userland/Libraries/LibGUI/TextDocument.h
index d559373f9b..8affc92d81 100644
--- a/Userland/Libraries/LibGUI/TextDocument.h
+++ b/Userland/Libraries/LibGUI/TextDocument.h
@@ -81,7 +81,7 @@ public:
void set_spans(Vector<TextDocumentSpan> spans) { m_spans = move(spans); }
- void set_text(const StringView&);
+ bool set_text(const StringView&);
const NonnullOwnPtrVector<TextDocumentLine>& lines() const { return m_lines; }
NonnullOwnPtrVector<TextDocumentLine>& lines() { return m_lines; }
@@ -176,7 +176,7 @@ public:
Utf32View view() const { return { code_points(), length() }; }
const u32* code_points() const { return m_text.data(); }
size_t length() const { return m_text.size(); }
- void set_text(TextDocument&, const StringView&);
+ bool set_text(TextDocument&, const StringView&);
void set_text(TextDocument&, Vector<u32>);
void append(TextDocument&, u32);
void prepend(TextDocument&, u32);