Fix setting line edit caret after dobule and triple click

This commit is contained in:
iwek 2022-06-10 00:02:48 +02:00
parent f2bf93070f
commit 082cf5440e
1 changed files with 2 additions and 2 deletions

View File

@ -312,7 +312,7 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
selection.end = text.length();
selection.double_click = true;
last_dblclk = 0;
caret_column = selection.begin;
set_caret_column(selection.begin);
if (!pass && DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_CLIPBOARD_PRIMARY)) {
DisplayServer::get_singleton()->clipboard_set_primary(text);
}
@ -327,7 +327,7 @@ void LineEdit::gui_input(const Ref<InputEvent> &p_event) {
selection.begin = words[i];
selection.end = words[i + 1];
selection.double_click = true;
caret_column = selection.end;
set_caret_column(selection.end);
break;
}
}