diff --git a/src/window.cc b/src/window.cc index 1b74f341..78a5fe00 100644 --- a/src/window.cc +++ b/src/window.cc @@ -64,6 +64,8 @@ void Window::update_display_buffer() m_display_buffer.compute_range(); m_highlighters(m_display_buffer); m_display_buffer.optimize(); + + m_timestamp = buffer().timestamp(); } void Window::set_position(const DisplayCoord& position) diff --git a/src/window.hh b/src/window.hh index 866bb3fb..1433bd2c 100644 --- a/src/window.hh +++ b/src/window.hh @@ -46,6 +46,8 @@ public: HookManager& hook_manager() { return m_hook_manager; } const HookManager& hook_manager() const { return m_hook_manager; } + size_t timestamp() const { return m_timestamp; } + void forget_timestamp() { m_timestamp = -1; } private: friend class Buffer; @@ -66,6 +68,8 @@ private: HookManager m_hook_manager; OptionManager m_option_manager; + + size_t m_timestamp = -1; }; }