From 8d598693fc7e006d9f3b31e8428d032e95488308 Mon Sep 17 00:00:00 2001 From: Oliver Dick Date: Sun, 7 Feb 2021 00:28:57 +0100 Subject: [PATCH] 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 --- scene/gui/text_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 81c53708ab5..9285314abe8 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -2296,7 +2296,7 @@ void TextEdit::_gui_input(const Ref &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)) {