mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
LibGUI: Shift+Tab unindents line
Previously, pressing Shift+Tab would indent the line if no selection was given. While with a selection, it would be unindented. With this change, pressing Shift+Tab with no selection unindents the current line. For this, add unindent_line() helper function. This function unindents the current line by at most one tab width if it starts with whitespace, regardless of cursor position.
This commit is contained in:
parent
03d0c7a5b6
commit
0ea399d8d6
2 changed files with 18 additions and 0 deletions
|
@ -158,6 +158,7 @@ public:
|
|||
bool is_indenting_selection();
|
||||
void indent_selection();
|
||||
void unindent_selection();
|
||||
void unindent_line();
|
||||
|
||||
Function<void()> on_change;
|
||||
Function<void(bool modified)> on_modified_change;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue