Skip to content

Commit

Permalink
TextEdit: When left mouse is pressed to place the cursor, do not imme…
Browse files Browse the repository at this point in the history
…diately adjust the viewport when cursor_set_line is called, but afterwards on cursor_set_column (effectively when the cursor reached its final position)

Fixes godotengine#45770
  • Loading branch information
revilo committed Feb 6, 2021
1 parent fa2f769 commit 8d59869
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/gui/text_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 8d59869

Please sign in to comment.