Store creation timepoint in HistoryNode

This commit is contained in:
Maxime Coste 2016-07-20 08:50:38 +01:00
parent 46a15534c5
commit b9c77e2f09
2 changed files with 5 additions and 1 deletions

View File

@ -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)

View File

@ -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<std::unique_ptr<HistoryNode>, MemoryDomain::BufferMeta> childs;
SafePtr<HistoryNode> redo_child;
TimePoint timepoint;
};
HistoryNode m_history;