From 3f471c138ab173027489d959090fe06fb92774d6 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 21 Aug 2012 20:53:23 +0200 Subject: [PATCH] RegexColorizer: fix last buffer line highlighting --- src/highlighters.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/highlighters.cc b/src/highlighters.cc index a9c48024..3313eaa8 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -103,8 +103,8 @@ private: return; m_cache_matches.clear(); - m_cache_range.first = buf.iterator_at({range.first.line() - 10, 0}); - m_cache_range.second = buf.iterator_at({range.second.line() + 10, 0}); + m_cache_range.first = buf.iterator_at_line_begin(range.first.line() - 10); + m_cache_range.second = buf.iterator_at_line_end(range.second.line() + 10); m_cache_timestamp = buf.timestamp(); RegexIterator re_it(m_cache_range.first, m_cache_range.second, m_regex);