summaryrefslogtreecommitdiff
path: root/src/selectors.cc
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2020-05-17 14:04:59 +0200
committerJohannes Altmanninger <aclopte@gmail.com>2020-05-17 14:11:45 +0200
commit08509cb4087d7d79868fcff96080bb9947ce4e7b (patch)
tree0873424951cfde1596cd3b0e6595f4deec5bfaf1 /src/selectors.cc
parent5fd548d5cfa9a96a247319398654c944eb52a671 (diff)
Refactor: use is_eol() as elsewhere in this function
Diffstat (limited to 'src/selectors.cc')
-rw-r--r--src/selectors.cc4
1 files changed, 2 insertions, 2 deletions
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;