diff --git a/src/highlighters.cc b/src/highlighters.cc index 62d9b9030..d5314b2cf 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -1673,7 +1673,10 @@ struct RegionMatches --recurse_level; } - beg_pos = end_it->end_coord(); + if (beg_pos != end_it->end_coord()) + beg_pos = end_it->end_coord(); + else + ++end_it; } } };