Fix cursor when undoing accept/reject all changes

Before this change, the whole document would remain selected.

This relies on the new UndoGroupHelper constructor introduced at e7b1ee47.
This commit is contained in:
Jean-Marc Lasgouttes 2024-06-20 18:00:13 +02:00
parent e7b1ee47ea
commit c4531741a9

View File

@ -1686,6 +1686,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
break; break;
case LFUN_ALL_CHANGES_ACCEPT: { case LFUN_ALL_CHANGES_ACCEPT: {
UndoGroupHelper helper(cur);
// select complete document // select complete document
cur.reset(); cur.reset();
cur.selHandle(true); cur.selHandle(true);
@ -1705,6 +1706,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
} }
case LFUN_ALL_CHANGES_REJECT: { case LFUN_ALL_CHANGES_REJECT: {
UndoGroupHelper helper(cur);
// select complete document // select complete document
cur.reset(); cur.reset();
cur.selHandle(true); cur.selHandle(true);