When selecting forward paragraph and we are on an end of line, select the next one.

Fixes #62. Thanks to alexherbo2.
This commit is contained in:
Maxime Coste 2014-03-30 11:13:45 +01:00
parent 5079d78747
commit c3a1318ffd

View File

@ -298,6 +298,8 @@ Selection select_whole_paragraph(const Buffer& buffer, const Selection& selectio
} }
if (flags & ObjectFlags::ToEnd) if (flags & ObjectFlags::ToEnd)
{ {
if (last != buffer.end() && is_eol(*last))
++last;
while (last != buffer.end()) while (last != buffer.end())
{ {
char cur = *last; char cur = *last;