Fix TextEdit cursor position after undo remove text
It was going to where the text started, now it goes to where the text
ends.
(cherry picked from commit 831ae2d510
)
This commit is contained in:
parent
86c4bbc031
commit
edadb46bd4
|
@ -3748,8 +3748,13 @@ void TextEdit::undo() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cursor_set_line(undo_stack_pos->get().from_line);
|
if (undo_stack_pos->get().type == TextOperation::TYPE_REMOVE) {
|
||||||
cursor_set_column(undo_stack_pos->get().from_column);
|
cursor_set_line(undo_stack_pos->get().to_line);
|
||||||
|
cursor_set_column(undo_stack_pos->get().to_column);
|
||||||
|
} else {
|
||||||
|
cursor_set_line(undo_stack_pos->get().from_line);
|
||||||
|
cursor_set_column(undo_stack_pos->get().from_column);
|
||||||
|
}
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue