From f540566b1b4565f9306101c67fa51776ff7dc0dc Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 4 Apr 2013 18:50:00 +0200 Subject: UserInterface: status line messages are now DisplayLines This add color support for the status line --- src/display_buffer.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/display_buffer.cc') diff --git a/src/display_buffer.cc b/src/display_buffer.cc index d9ab9609..f518ab50 100644 --- a/src/display_buffer.cc +++ b/src/display_buffer.cc @@ -42,6 +42,14 @@ void DisplayLine::optimize() } } +CharCount DisplayLine::length() const +{ + CharCount len = 0; + for (auto& atom : m_atoms) + len += atom.content.length(); + return len; +} + void DisplayBuffer::compute_range() { m_range.first = BufferIterator(); -- cgit v1.2.3