Merge pull request #47595 from EricEzaM/PR/fix-lineedit-ctrl-backspace

Fixed issues with LineEdit Delete Word & Backspace Word.
This commit is contained in:
Rémi Verschelde 2021-04-28 09:59:47 +02:00 committed by GitHub
commit 7bca90769c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,6 +155,7 @@ void LineEdit::_backspace(bool p_word, bool p_all_to_left) {
for (int i = words.size() - 1; i >= 0; i--) {
if (words[i].x < cc) {
cc = words[i].x;
break;
}
}
@ -202,6 +203,7 @@ void LineEdit::_delete(bool p_word, bool p_all_to_right) {
}
delete_text(caret_column, cc);
set_caret_column(caret_column);
} else {
if (caret_mid_grapheme_enabled) {
set_caret_column(caret_column + 1);