diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-09-26 00:27:23 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-09-26 00:27:23 +0100 |
| commit | 9beba9006064355f4af1df403b9305cda6d356cf (patch) | |
| tree | 0fee75afd79e83086e931b09450e1ae0af151b59 /src | |
| parent | bfef8fd5aa87e75bcd153db431cd988c426c1357 (diff) | |
Finding next matches start from seleciton min/max instead of cursor
uses min for backward serching, max for forward searching.
Diffstat (limited to 'src')
| -rw-r--r-- | src/selectors.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/selectors.hh b/src/selectors.hh index 5107226e..c985cc72 100644 --- a/src/selectors.hh +++ b/src/selectors.hh @@ -261,7 +261,7 @@ bool find_match_in_buffer(const Buffer& buffer, const BufferIterator pos, template<Direction direction> Selection find_next_match(const Buffer& buffer, const Selection& sel, const Regex& regex) { - auto begin = buffer.iterator_at(sel.cursor()); + auto begin = buffer.iterator_at(direction == Backward ? sel.min() : sel.max()); auto end = begin; CaptureList captures; |
