From 60dfeb2821a076c3245604b14901435f688ff829 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 21 Jun 2013 18:50:45 +0100 Subject: [PATCH] fix highlighting bug with inserting at eol on lines with tabs --- src/window.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/window.cc b/src/window.cc index 41cfe0dc..dcdc42e3 100644 --- a/src/window.cc +++ b/src/window.cc @@ -71,7 +71,7 @@ void Window::update_display_buffer() break; const String& content = buffer()[buffer_line]; BufferCoord begin{buffer_line, content.byte_count_to(m_position.column)}; - BufferCoord end{buffer_line, content.byte_count_to(m_position.column + m_dimensions.column)}; + BufferCoord end = buffer().advance(buffer_line, content.byte_count_to(m_position.column + m_dimensions.column)); lines.push_back(DisplayLine(buffer_line)); lines.back().push_back(DisplayAtom(AtomContent(buffer(), begin, end)));