1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-11-28 01:00:28 +03:00

Refactor: use is_eol() as elsewhere in this function

This commit is contained in:
Johannes Altmanninger 2020-05-17 14:04:59 +02:00
parent 5fd548d5cf
commit 08509cb408

View File

@ -560,11 +560,11 @@ select_paragraph(const Context& context, const Selection& selection,
BufferIterator first = buffer.iterator_at(selection.cursor());
if (not (flags & ObjectFlags::ToEnd) and first.coord() > BufferCoord{0,1} and
*(first-1) == '\n' and *(first-2) == '\n')
is_eol(*(first-1)) and is_eol(*(first-2)))
--first;
else if ((flags & ObjectFlags::ToEnd) and
first != buffer.begin() and (first+1) != buffer.end() and
*(first-1) == '\n' and *first == '\n')
is_eol(*(first-1)) and is_eol(*first))
++first;
BufferIterator last = first;