diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-05-04 11:21:19 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-05-04 11:21:19 +0100 |
| commit | e92e6c775a357fd7912f806bfc1973b2443d463e (patch) | |
| tree | 916710a9cdb39d4424b0064ec2e76ff4dfedd092 /src | |
| parent | 8cc9454438e2e4fb6729c87e331dbe5fa6b5d671 (diff) | |
Paragraph selection selects next paragraph when on previous end
Diffstat (limited to 'src')
| -rw-r--r-- | src/selectors.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/selectors.cc b/src/selectors.cc index 4aaea633..7d3651d9 100644 --- a/src/selectors.cc +++ b/src/selectors.cc @@ -291,6 +291,10 @@ Selection select_whole_paragraph(const Buffer& buffer, const Selection& selectio if (not (flags & ObjectFlags::ToEnd) and buffer.offset(first.coord()) > 1 and *(first-1) == '\n' and *(first-2) == '\n') --first; + else if ((flags & ObjectFlags::ToEnd) and + first != buffer.begin() and (first+1) != buffer.end() and + *(first-1) == '\n' and *first == '\n') + ++first; BufferIterator last = first; |
