diff options
| author | Johannes Altmanninger <aclopte@gmail.com> | 2020-05-17 14:04:59 +0200 |
|---|---|---|
| committer | Johannes Altmanninger <aclopte@gmail.com> | 2020-05-17 14:11:45 +0200 |
| commit | 08509cb4087d7d79868fcff96080bb9947ce4e7b (patch) | |
| tree | 0873424951cfde1596cd3b0e6595f4deec5bfaf1 /src/selectors.cc | |
| parent | 5fd548d5cfa9a96a247319398654c944eb52a671 (diff) | |
Refactor: use is_eol() as elsewhere in this function
Diffstat (limited to 'src/selectors.cc')
| -rw-r--r-- | src/selectors.cc | 4 |
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; |
