diff --git a/src/buffer.cc b/src/buffer.cc index 87551c5d..d0a17f74 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -59,7 +59,9 @@ static void apply_options(OptionManager& options, const ParsedLines& parsed_line options.get_local_option("BOM").set(parsed_lines.bom); } -Buffer::HistoryNode::HistoryNode(HistoryNode* parent) : parent(parent) {} +Buffer::HistoryNode::HistoryNode(HistoryNode* parent) + : parent(parent), timepoint{Clock::now()} +{} Buffer::Buffer(String name, Flags flags, StringView data, timespec fs_timestamp) diff --git a/src/buffer.hh b/src/buffer.hh index 2bc1e098..cd136476 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -1,6 +1,7 @@ #ifndef buffer_hh_INCLUDED #define buffer_hh_INCLUDED +#include "clock.hh" #include "coord.hh" #include "flags.hh" #include "safe_ptr.hh" @@ -250,6 +251,7 @@ private: UndoGroup undo_group; Vector, MemoryDomain::BufferMeta> childs; SafePtr redo_child; + TimePoint timepoint; }; HistoryNode m_history;