summaryrefslogtreecommitdiff
path: root/src/selectors.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-10-05 23:42:36 +0100
committerMaxime Coste <frrrwww@gmail.com>2016-10-05 23:42:36 +0100
commit9078039326a7a2b5d7d78998171fe61ea3f72fe9 (patch)
tree55ad88dbe143e1dbfd67a61e7850408dcf050324 /src/selectors.hh
parent8579e299da2b0882ee906ae236a16f7db21c3387 (diff)
Fix select_to_previous_word with spaces at buffer start
Fixes #844
Diffstat (limited to 'src/selectors.hh')
-rw-r--r--src/selectors.hh3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/selectors.hh b/src/selectors.hh
index 462b188f..f9be9247 100644
--- a/src/selectors.hh
+++ b/src/selectors.hh
@@ -94,9 +94,8 @@ Selection select_to_previous_word(const Buffer& buffer, const Selection& selecti
skip_while_reverse(begin, buffer.begin(), [](Codepoint c){ return is_eol(c); });
Utf8Iterator end = begin;
- skip_while_reverse(end, buffer.begin(), is_horizontal_blank);
- bool with_end = false;
+ bool with_end = skip_while_reverse(end, buffer.begin(), is_horizontal_blank);
if (word_type == Word and is_punctuation(*end))
with_end = skip_while_reverse(end, buffer.begin(), is_punctuation);