select_to_{,reverse}: search on other lines if needed
This commit is contained in:
parent
6907fcf76e
commit
ee800ad778
|
@ -290,8 +290,8 @@ Selection select_to(const Selection& selection,
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
++end;
|
++end;
|
||||||
skip_while(end, [c](Codepoint cur) { return not is_eol(cur) and cur != c; });
|
skip_while(end, [c](Codepoint cur) { return cur != c; });
|
||||||
if (is_end(end) or is_eol(*end))
|
if (is_end(end))
|
||||||
return selection;
|
return selection;
|
||||||
}
|
}
|
||||||
while (--count > 0);
|
while (--count > 0);
|
||||||
|
@ -307,8 +307,8 @@ Selection select_to_reverse(const Selection& selection,
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
--end;
|
--end;
|
||||||
skip_while_reverse(end, [c](Codepoint cur) { return not is_eol(cur) and cur != c; });
|
skip_while_reverse(end, [c](Codepoint cur) { return cur != c; });
|
||||||
if (is_begin(end) or is_eol(*end))
|
if (is_begin(end))
|
||||||
return selection;
|
return selection;
|
||||||
}
|
}
|
||||||
while (--count > 0);
|
while (--count > 0);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user