Finding next matches start from seleciton min/max instead of cursor
uses min for backward serching, max for forward searching.
This commit is contained in:
parent
bfef8fd5aa
commit
9beba90060
|
@ -261,7 +261,7 @@ bool find_match_in_buffer(const Buffer& buffer, const BufferIterator pos,
|
||||||
template<Direction direction>
|
template<Direction direction>
|
||||||
Selection find_next_match(const Buffer& buffer, const Selection& sel, const Regex& regex)
|
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;
|
auto end = begin;
|
||||||
|
|
||||||
CaptureList captures;
|
CaptureList captures;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user