瀏覽代碼

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

(cherry picked from commit 8d598693fc7e006d9f3b31e8428d032e95488308)
Oliver Dick 4 年之前
父節點
當前提交
db57f32194
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scene/gui/text_edit.cpp

+ 1 - 1
scene/gui/text_edit.cpp

@@ -2389,7 +2389,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)) {