From c4de866903b20e8cdc132a12dde15f667df9a11f Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 12 Nov 2013 18:59:19 +0000 Subject: [PATCH] Fix select_to_previous_word when cursor is on last buffer char --- src/selectors.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/selectors.cc b/src/selectors.cc index 155c9737..7d0c4192 100644 --- a/src/selectors.cc +++ b/src/selectors.cc @@ -131,7 +131,7 @@ template Selection select_to_previous_word(const Buffer& buffer, const Selection& selection) { Utf8Iterator begin = buffer.iterator_at(selection.last()); - if (begin+1 == buffer.end()) + if (begin == buffer.begin()) return selection; if (categorize(*begin) != categorize(*(begin-1))) --begin;