Fix deleting selection at the first line do not work with backspace

This commit is contained in:
Jean-Michel Bernard 2021-10-01 20:22:22 +02:00
parent 871910feaf
commit 9c375170e4
2 changed files with 52 additions and 5 deletions

View file

@ -614,6 +614,11 @@ void CodeEdit::_backspace_internal() {
return;
}
if (has_selection()) {
delete_selection();
return;
}
int cc = get_caret_column();
int cl = get_caret_line();
@ -621,11 +626,6 @@ void CodeEdit::_backspace_internal() {
return;
}
if (has_selection()) {
delete_selection();
return;
}
if (cl > 0 && _is_line_hidden(cl - 1)) {
unfold_line(get_caret_line() - 1);
}