From df082eaf16a047444ac3e6d5316a6728c9eb2eca Mon Sep 17 00:00:00 2001 From: Tim Stack Date: Tue, 2 Aug 2022 15:00:41 -0700 Subject: [PATCH] [highlighter] fix string range for pcrepp input --- src/highlighter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/highlighter.cc b/src/highlighter.cc index 63e1097e..1323ffa9 100644 --- a/src/highlighter.cc +++ b/src/highlighter.cc @@ -89,7 +89,7 @@ highlighter::annotate(attr_line_t& al, int start) const auto& vc = view_colors::singleton(); const auto& str = al.get_string(); auto& sa = al.get_attrs(); - auto sf = string_fragment::from_substr( + auto sf = string_fragment::from_str_range( str, start, std::min(size_t{8192}, str.size())); pcre_context_static<60> pc;