summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Dick <oliver.dick@evilstorm.de>2021-02-07 00:28:57 +0100
committerOliver Dick <oliver.dick@evilstorm.de>2021-02-07 00:28:57 +0100
commit8d598693fc7e006d9f3b31e8428d032e95488308 (patch)
tree89649fbd8a7ef7984c345b48fa67383dbe476938
parentfa2f7693bb9efc44755b1b693b22ec2788910a0d (diff)
TextEdit: When left mouse is pressed to place the cursor, do not immediately adjust the viewport when cursor_set_line is called, but afterwards on cursor_set_column (effectively when the cursor reached its final position)
Fixes #45770
-rw-r--r--scene/gui/text_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 81c53708ab..9285314abe 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -2296,7 +2296,7 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {
int prev_col = cursor.column;
int prev_line = cursor.line;
- cursor_set_line(row, true, false);
+ cursor_set_line(row, false, false);
cursor_set_column(col);
if (mb->get_shift() && (cursor.column != prev_col || cursor.line != prev_line)) {