Merge remote-tracking branch 'krobelus/paragraph-begin-oob'
This commit is contained in:
commit
aad20f6576
|
@ -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 first-1 != buffer.begin() 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;
|
||||
|
|
1
test/regression/3489-crash-on-paragraph-begin/cmd
Normal file
1
test/regression/3489-crash-on-paragraph-begin/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
j<a-[>p
|
2
test/regression/3489-crash-on-paragraph-begin/in
Normal file
2
test/regression/3489-crash-on-paragraph-begin/in
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
|
|
@ -0,0 +1 @@
|
|||
2.1,1.1
|
Loading…
Reference in New Issue
Block a user