We can delete all text on TextEdit

While all text of TextEdit was selected, deletion with backspace did not occur. It can now be deleted.
This commit is contained in:
requizm 2021-08-17 02:30:14 +03:00
parent 7013199fb1
commit 37ad82a7f7

View file

@ -4906,6 +4906,11 @@ void TextEdit::_backspace() {
return;
}
if (has_selection()) {
delete_selection();
return;
}
int cc = get_caret_column();
int cl = get_caret_line();
@ -4913,11 +4918,6 @@ void TextEdit::_backspace() {
return;
}
if (has_selection()) {
delete_selection();
return;
}
int prev_line = cc ? cl : cl - 1;
int prev_column = cc ? (cc - 1) : (text[cl - 1].length());