diff options
Diffstat (limited to 'src/buffer.cc')
| -rw-r--r-- | src/buffer.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/buffer.cc b/src/buffer.cc index 3eb6920c..2bf5db95 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -197,6 +197,8 @@ struct Buffer::Modification bool Buffer::undo() { + commit_undo_group(); + if (m_history_cursor == m_history.begin()) return false; @@ -212,6 +214,8 @@ bool Buffer::redo() if (m_history_cursor == m_history.end()) return false; + assert(m_current_undo_group.empty()); + for (const Modification& modification : *m_history_cursor) apply_modification(modification); |
