From e8c648b7b796219b170bea529a5257a38621f861 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 8 May 2018 21:55:15 +1000 Subject: 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 --- src/display_buffer.hh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/display_buffer.hh') 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; }; } -- cgit v1.2.3