From 3ea690a92ec2ebb5fa49606c6e932c2b3ef387df Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 1 Oct 2014 13:54:33 +0100 Subject: [PATCH] Fix finding next match when the cursor is in the middle of the only match --- src/selectors.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/selectors.hh b/src/selectors.hh index c985cc72..a75fac8a 100644 --- a/src/selectors.hh +++ b/src/selectors.hh @@ -252,10 +252,10 @@ bool find_match_in_buffer(const Buffer& buffer, const BufferIterator pos, { if (direction == Forward) return (boost::regex_search(pos, buffer.end(), matches, ex) or - boost::regex_search(buffer.begin(), pos, matches, ex)); + boost::regex_search(buffer.begin(), buffer.end(), matches, ex)); else return (find_last_match(buffer.begin(), pos, matches, ex) or - find_last_match(pos, buffer.end(), matches, ex)); + find_last_match(buffer.begin(), buffer.end(), matches, ex)); } template