Merge remote-tracking branch 'krobelus/paragraph-begin-oob'

This commit is contained in:
Maxime Coste 2020-05-19 19:17:03 +10:00
commit aad20f6576
4 changed files with 6 additions and 2 deletions

View File

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

View File

@ -0,0 +1 @@
j<a-[>p

View File

@ -0,0 +1,2 @@

View File

@ -0,0 +1 @@
2.1,1.1