diff options
author | Cheeseness <contact@jbushproductions.com> | 2020-08-14 23:53:34 +1000 |
---|---|---|
committer | Cheeseness <contact@jbushproductions.com> | 2020-08-14 23:53:34 +1000 |
commit | 1f159306ed4068b364fbbd25507ad67ec736f589 (patch) | |
tree | 4f3eaec85ed6f09cad6ecb2d845d9a02cb52bb00 /scene/gui | |
parent | 5100bb42ae92feff9d68d3ef080938980e666bbc (diff) |
Skip indentation of empty lines when indenting a selection.
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/text_edit.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index a17fdd0651..d6d8e74748 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1872,6 +1872,9 @@ void TextEdit::indent_right() { for (int i = start_line; i <= end_line; i++) { String line_text = get_line(i); + if (line_text.size() == 0 && is_selection_active()) { + continue; + } if (indent_using_spaces) { // We don't really care where selection is - we just need to know indentation level at the beginning of the line. int left = _find_first_non_whitespace_column_of_line(line_text); |