From a7c33207d6c00d765e133d2c768b550db5ccc656 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 4 Jun 2012 14:12:37 +0000 Subject: [PATCH] check if no modification were made in Buffer::end_undo_group --- src/buffer.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/buffer.cc b/src/buffer.cc index 597c2981..7f3f8000 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -145,6 +145,9 @@ void Buffer::begin_undo_group() void Buffer::end_undo_group() { + if (m_current_undo_group.empty()) + return; + m_history.push_back(m_current_undo_group); m_history_cursor = m_history.end();