Paragraph selection selects next paragraph when on previous end

This commit is contained in:
Maxime Coste 2014-05-04 11:21:19 +01:00
parent 8cc9454438
commit e92e6c775a

View File

@ -291,6 +291,10 @@ Selection select_whole_paragraph(const Buffer& buffer, const Selection& selectio
if (not (flags & ObjectFlags::ToEnd) and buffer.offset(first.coord()) > 1 and
*(first-1) == '\n' and *(first-2) == '\n')
--first;
else if ((flags & ObjectFlags::ToEnd) and
first != buffer.begin() and (first+1) != buffer.end() and
*(first-1) == '\n' and *first == '\n')
++first;
BufferIterator last = first;