mirror of
https://github.com/mawww/kakoune.git
synced 2024-11-30 23:37:17 +03:00
Selectors: fix select_whole_lines
This commit is contained in:
parent
2f8f71db67
commit
7b09b34cab
@ -287,11 +287,12 @@ SelectionList select_whole_lines(const Selection& selection)
|
|||||||
BufferIterator& to_line_start = first <= last ? first : last;
|
BufferIterator& to_line_start = first <= last ? first : last;
|
||||||
BufferIterator& to_line_end = first <= last ? last : first;
|
BufferIterator& to_line_end = first <= last ? last : first;
|
||||||
|
|
||||||
|
--to_line_start;
|
||||||
skip_while_reverse(to_line_start, [](char cur) { return not is_eol(cur); });
|
skip_while_reverse(to_line_start, [](char cur) { return not is_eol(cur); });
|
||||||
|
++to_line_start;
|
||||||
|
|
||||||
skip_while(to_line_end, [](char cur) { return not is_eol(cur); });
|
skip_while(to_line_end, [](char cur) { return not is_eol(cur); });
|
||||||
|
|
||||||
if (to_line_start != to_line_end)
|
|
||||||
++to_line_start;
|
|
||||||
|
|
||||||
SelectionList result;
|
SelectionList result;
|
||||||
result.push_back(Selection(first, last));
|
result.push_back(Selection(first, last));
|
||||||
|
Loading…
Reference in New Issue
Block a user