Skip to content

Commit

Permalink
Fix LineEdit caret rendering/positioning on Undo.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSofox committed Jan 9, 2024
1 parent c8c483c commit 6888d95
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scene/gui/line_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1228,9 +1228,10 @@ void LineEdit::undo() {
TextOperation op = undo_stack_pos->get();
text = op.text;
scroll_offset = op.scroll_offset;
set_caret_column(op.caret_column);

_shape();
set_caret_column(op.caret_column);

_emit_text_change();
}

Expand All @@ -1252,9 +1253,10 @@ void LineEdit::redo() {
TextOperation op = undo_stack_pos->get();
text = op.text;
scroll_offset = op.scroll_offset;
set_caret_column(op.caret_column);

_shape();
set_caret_column(op.caret_column);

_emit_text_change();
}

Expand Down

0 comments on commit 6888d95

Please sign in to comment.