Fix deleting selection at the first line do not work with backspace
This commit is contained in:
parent
871910feaf
commit
9c375170e4
2 changed files with 52 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue