Window: maintain the timestamp of last display buffer update

This commit is contained in:
Maxime Coste 2012-11-05 19:54:09 +01:00
parent fedabb4176
commit a41bb34b21
2 changed files with 6 additions and 0 deletions

View File

@ -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)

View File

@ -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;
};
}