summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-25 22:56:09 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-25 22:56:09 +0200
commit71770e000b6bec4bbe1a09e0506c68f4594c74c0 (patch)
tree57a30f365bc6ca4dee169e9501f483194035cf0b /Applications
parent8a3d00ac025562ee45efae73fcccd0ac3cde0e1e (diff)
downloadserenity-71770e000b6bec4bbe1a09e0506c68f4594c74c0.zip
GTextEditor: Add very basic automatic indentation.
This is off by default, but enabled by TextEditor. It simply inserts the same number of leading spaces as the previous line when hitting Enter. :^)
Diffstat (limited to 'Applications')
-rw-r--r--Applications/TextEditor/main.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Applications/TextEditor/main.cpp b/Applications/TextEditor/main.cpp
index 4ba1c3d184..5588792e0e 100644
--- a/Applications/TextEditor/main.cpp
+++ b/Applications/TextEditor/main.cpp
@@ -25,6 +25,7 @@ int main(int argc, char** argv)
auto* toolbar = new GToolBar(widget);
auto* text_editor = new GTextEditor(GTextEditor::MultiLine, widget);
text_editor->set_ruler_visible(true);
+ text_editor->set_automatic_indentation_enabled(true);
auto* statusbar = new GStatusBar(widget);
text_editor->on_cursor_change = [statusbar, text_editor] {