Merge pull request #51760 from requizm/fix/deleteallselection
Deletion occurs when all text is selected
This commit is contained in:
commit
c4e03672e8
@ -4906,6 +4906,11 @@ void TextEdit::_backspace() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (has_selection()) {
|
||||||
|
delete_selection();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int cc = get_caret_column();
|
int cc = get_caret_column();
|
||||||
int cl = get_caret_line();
|
int cl = get_caret_line();
|
||||||
|
|
||||||
@ -4913,11 +4918,6 @@ void TextEdit::_backspace() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (has_selection()) {
|
|
||||||
delete_selection();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int prev_line = cc ? cl : cl - 1;
|
int prev_line = cc ? cl : cl - 1;
|
||||||
int prev_column = cc ? (cc - 1) : (text[cl - 1].length());
|
int prev_column = cc ? (cc - 1) : (text[cl - 1].length());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user