summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-07 16:51:47 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-07 16:51:47 +0100
commita5bc20c7330f0a0577b52ae7f1dc70b88407f88b (patch)
tree74ce3bcb8d3b0e4f7a42a2a0e11276626ab04815
parent43d56b6f3a45dd2f92f4fd7b1cf7a8bdf0cb57ba (diff)
downloadserenity-a5bc20c7330f0a0577b52ae7f1dc70b88407f88b.zip
GTextEditor: Support starting with an empty document.
-rw-r--r--LibGUI/GTextEditor.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/LibGUI/GTextEditor.cpp b/LibGUI/GTextEditor.cpp
index 5e2b2f9dcb..72d6321735 100644
--- a/LibGUI/GTextEditor.cpp
+++ b/LibGUI/GTextEditor.cpp
@@ -23,6 +23,8 @@ GTextEditor::GTextEditor(GWidget* parent)
m_horizontal_scrollbar->on_change = [this] (int) {
update();
};
+
+ m_lines.append(make<Line>());
}
GTextEditor::~GTextEditor()