summaryrefslogtreecommitdiff
path: root/src/buffer_utils.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2018-10-08 12:35:24 +1100
committerMaxime Coste <mawww@kakoune.org>2018-10-08 12:40:52 +1100
commited84a2d60c955415d4751f0079310f36cd5f3d2f (patch)
tree92b723fc34b0baad8f9345e94df40a0d6064ade0 /src/buffer_utils.hh
parenteba40028b983f1698dc79aae779f2d8eda8918c4 (diff)
Buffer begin and end are not end-of-words
Buffer begin never has a word character before, and end is always preceeded by an end-of-line. Fixes #2420
Diffstat (limited to 'src/buffer_utils.hh')
-rw-r--r--src/buffer_utils.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buffer_utils.hh b/src/buffer_utils.hh
index 92cc52cf..a635658b 100644
--- a/src/buffer_utils.hh
+++ b/src/buffer_utils.hh
@@ -63,7 +63,7 @@ inline bool is_bow(const Buffer& buffer, BufferCoord coord)
inline bool is_eow(const Buffer& buffer, BufferCoord coord)
{
if (buffer.is_end(coord) or coord == BufferCoord{0,0})
- return true;
+ return false;
auto it = utf8::iterator<BufferIterator>(buffer.iterator_at(coord), buffer);
return is_word(*(it-1)) and not is_word(*it);