summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriwek <miwanczuk7@gmail.com>2022-06-10 00:02:48 +0200
committeriwek <miwanczuk7@gmail.com>2022-06-10 00:18:25 +0200
commit082cf5440ef8822d6addf5a21de7b86618663f19 (patch)
tree4e8f9a1f823823d5fd32ab7021b00174c57dd363
parentf2bf93070f98c1bb3c23ea8adb1b5903796e0817 (diff)
Fix setting line edit caret after dobule and triple click
-rw-r--r--scene/gui/line_edit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index fa600d24ef..540250c8e9 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -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;
}
}