summaryrefslogtreecommitdiff
path: root/src/buffer.cc
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-11-23 13:41:07 +0100
committerMaxime Coste <frrrwww@gmail.com>2012-11-23 13:41:07 +0100
commit2523c4955b68081876d079c0918c781fd89af564 (patch)
tree0fa5007763e33fa748e8fd70f60f2550c9cfcc14 /src/buffer.cc
parentd2f811a8d5ef527eb98da7acdee93fa8f00131f2 (diff)
buffer: increment timestamp on notify saved
Diffstat (limited to 'src/buffer.cc')
-rw-r--r--src/buffer.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/buffer.cc b/src/buffer.cc
index b8de1e37..ac0b8fce 100644
--- a/src/buffer.cc
+++ b/src/buffer.cc
@@ -392,7 +392,11 @@ bool Buffer::is_modified() const
void Buffer::notify_saved()
{
size_t history_cursor_index = m_history_cursor - m_history.begin();
- m_last_save_undo_index = history_cursor_index;
+ if (m_last_save_undo_index != history_cursor_index)
+ {
+ ++m_timestamp;
+ m_last_save_undo_index = history_cursor_index;
+ }
}
void Buffer::add_change_listener(BufferChangeListener& listener) const