diff options
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r-- | scene/gui/text_edit.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 598420da37..90974e31df 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -3863,7 +3863,7 @@ void TextEdit::undo() { } caret_pos_dirty = true; } - queue_redraw(); + adjust_viewport_to_caret(); } void TextEdit::redo() { @@ -3915,7 +3915,7 @@ void TextEdit::redo() { } caret_pos_dirty = true; } - queue_redraw(); + adjust_viewport_to_caret(); } void TextEdit::clear_undo_history() { @@ -4825,10 +4825,11 @@ void TextEdit::select_word_under_caret(int p_caret) { continue; } - select(get_caret_line(c), begin, get_caret_column(c), end, c); + select(get_caret_line(c), begin, get_caret_line(c), end, c); // Move the caret to the end of the word for easier editing. set_caret_column(end, false, c); } + merge_overlapping_carets(); } void TextEdit::select(int p_from_line, int p_from_column, int p_to_line, int p_to_column, int p_caret) { |