From e0cd8ad93c01fc451cf93507f56597db0d0a500d Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 14 Jun 2014 14:07:03 +0100 Subject: [PATCH] Fix crash in paragraph selection --- src/selectors.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/selectors.cc b/src/selectors.cc index ca85142ab..78200ba0f 100644 --- a/src/selectors.cc +++ b/src/selectors.cc @@ -346,9 +346,7 @@ Selection select_paragraph(const Buffer& buffer, const Selection& selection, Obj ++last; while (last != buffer.end()) { - char cur = *last; - char prev = *(last-1); - if (is_eol(cur) and is_eol(prev)) + if (last != buffer.begin() and is_eol(*last) and is_eol(*(last-1))) { if (not (flags & ObjectFlags::Inner)) skip_while(last, buffer.end(), is_eol);