Window: maintain the timestamp of last display buffer update
This commit is contained in:
parent
fedabb4176
commit
a41bb34b21
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user