diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-10-01 22:48:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-01 22:48:04 +0200 |
commit | ce0268a0c1d2a73dd9d59ed339a76bec6a429edd (patch) | |
tree | bb72beb9b1508d36c729f7ee1d59a616f87804f7 /scene | |
parent | 43e571427e121e8d8a073665026ea2324ca6f410 (diff) | |
parent | 9c375170e4dca5e62615fe5852414587e09c9434 (diff) |
Merge pull request #53284 from jmb462/fix-backspace-selection
Fix deleting selection at the first line do not work with backspace
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/code_edit.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp index 28d1689ff8..b816f12bc3 100644 --- a/scene/gui/code_edit.cpp +++ b/scene/gui/code_edit.cpp @@ -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); } |