diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-07-20 08:50:38 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-07-24 21:25:05 +0100 |
| commit | b9c77e2f09f34985aec83b6f5e5e9dc4b942af2f (patch) | |
| tree | 770fc6e8f5ab0232c2f80ddd6091b7e050d022a2 /src | |
| parent | 46a15534c5d012908eee4975a21dd0d53179b2b3 (diff) | |
Store creation timepoint in HistoryNode
Diffstat (limited to 'src')
| -rw-r--r-- | src/buffer.cc | 4 | ||||
| -rw-r--r-- | src/buffer.hh | 2 |
2 files changed, 5 insertions, 1 deletions
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<std::unique_ptr<HistoryNode>, MemoryDomain::BufferMeta> childs; SafePtr<HistoryNode> redo_child; + TimePoint timepoint; }; HistoryNode m_history; |
