mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 19:05:06 +00:00
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. :^)
This commit is contained in:
parent
8a3d00ac02
commit
71770e000b
5 changed files with 38 additions and 2 deletions
|
@ -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] {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue