From 08509cb4087d7d79868fcff96080bb9947ce4e7b Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 17 May 2020 14:04:59 +0200 Subject: Refactor: use is_eol() as elsewhere in this function --- src/selectors.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/selectors.cc b/src/selectors.cc index a6438040..baa2d9ac 100644 --- a/src/selectors.cc +++ b/src/selectors.cc @@ -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 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; -- cgit v1.2.3