Merge pull request #41114 from Cheeseness/indent_fix

Skip indentation of empty lines when indenting a selection.
This commit is contained in:
Rémi Verschelde 2020-08-14 16:03:55 +02:00 committed by GitHub
commit 167d48fde1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);