From a41bb34b21c2aeb540e3aac8cdf22f60fd1a3b27 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 5 Nov 2012 19:54:09 +0100 Subject: [PATCH] Window: maintain the timestamp of last display buffer update --- src/window.cc | 2 ++ src/window.hh | 4 ++++ 2 files changed, 6 insertions(+) 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; }; }