mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-11 14:22:41 +00:00
Fix deleting selection at the first line do not work with backspace
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user