summaryrefslogtreecommitdiff
path: root/src/display_buffer.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-05-08 21:55:15 +1000
committerMaxime Coste <mawww@kakoune.org>2018-05-08 21:56:44 +1000
commite8c648b7b796219b170bea529a5257a38621f861 (patch)
tree32443fe14ed95ec6d051856b33f8d30a07721235 /src/display_buffer.hh
parent148d6c205bf4a874dde2230b98281f02ae8bd579 (diff)
Store the timestamp at which a display buffer was generated
Coordinates inside a display buffer are only valid for a certain buffer content, they cannot be used once the buffer has been modified. Fixes #2034
Diffstat (limited to 'src/display_buffer.hh')
-rw-r--r--src/display_buffer.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/display_buffer.hh b/src/display_buffer.hh
index 6d20f105..ea945da1 100644
--- a/src/display_buffer.hh
+++ b/src/display_buffer.hh
@@ -163,9 +163,13 @@ public:
// Optimize all lines, set DisplayLine::optimize
void optimize();
+ void set_timestamp(size_t timestamp) { m_timestamp = timestamp; }
+ size_t timestamp() const { return m_timestamp; }
+
private:
LineList m_lines;
BufferRange m_range;
+ size_t m_timestamp;
};
}