diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-10-15 21:20:00 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-10-15 21:21:12 +1100 |
| commit | da13b5f8143a3809bb938c020b957e1c5ff8dae7 (patch) | |
| tree | 62de96e79c2949d66a1e25f72dfa7c3ff6521482 /src | |
| parent | 71e27c73af93c87bfd7f565350beeb5e35ae9be5 (diff) | |
Fix handling of capture matching in region highlighter
Also extend the highlight/regions test to validate that.
Thanks to lenormf for reviewing my change and finding this bug.
Diffstat (limited to 'src')
| -rw-r--r-- | src/highlighters.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/highlighters.cc b/src/highlighters.cc index 8ae36b79..2a67375c 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -1660,7 +1660,7 @@ void append_matches(const Buffer& buffer, LineCount line, RegexMatchList& matche { auto& m = *it; const bool with_capture = capture and m[1].matched and - m[0].second - m[0].first > std::numeric_limits<uint16_t>::max(); + m[0].second - m[0].first < std::numeric_limits<uint16_t>::max(); matches.push_back({ line, (int)(m[0].first - l.begin()), |
