From ed84a2d60c955415d4751f0079310f36cd5f3d2f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 8 Oct 2018 12:35:24 +1100 Subject: 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 --- src/buffer_utils.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/buffer_utils.hh') 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(buffer.iterator_at(coord), buffer); return is_word(*(it-1)) and not is_word(*it); -- cgit v1.2.3