diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-05 00:04:36 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-12-05 00:04:36 +0100 |
commit | bb7dbdf1d1f46d98e7d0f3a76e6befdb77e8f1cc (patch) | |
tree | d1e23ac273ee15a9ae8fc4b49e85da3531caea6d /scene/gui | |
parent | 015dc492de33a41eaeb14c0503a6be10466fe457 (diff) | |
parent | b663a825a68e6fb375a2c1c33d5cb1252606856c (diff) |
Merge pull request #69312 from RumblingTurtle/double-click-editor-fix
Editor doubleclick jumping in certain positions fix
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/text_edit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index cce9fa4f34..e7d704a281 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -7038,8 +7038,8 @@ void TextEdit::_update_selection_mode_word() { if ((col <= carets[caret_idx].selection.selected_word_origin && line == get_selection_line(caret_idx)) || line < get_selection_line(caret_idx)) { carets.write[caret_idx].selection.selecting_column = carets[caret_idx].selection.selected_word_end; select(line, beg, get_selection_line(caret_idx), carets[caret_idx].selection.selected_word_end, caret_idx); - set_caret_line(get_selection_from_line(caret_idx), false, true, 0, caret_idx); - set_caret_column(get_selection_from_column(caret_idx), true, caret_idx); + set_caret_line(line, false, true, 0, caret_idx); + set_caret_column(beg, true, caret_idx); } else { carets.write[caret_idx].selection.selecting_column = carets[caret_idx].selection.selected_word_beg; select(get_selection_line(caret_idx), carets[caret_idx].selection.selected_word_beg, line, end, caret_idx); |