From a51d5a10469bc5a555c58745f1f61880990ea4f7 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 3 Oct 2016 20:01:37 +0100 Subject: [PATCH] Do not select the next word for inner word. --- src/selectors.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/selectors.hh b/src/selectors.hh index 74f0d198..462b188f 100644 --- a/src/selectors.hh +++ b/src/selectors.hh @@ -149,8 +149,9 @@ Selection select_word(const Buffer& buffer, const Selection& selection, { Utf8Iterator first{buffer.iterator_at(selection.cursor()), buffer}; if (not is_word(*first) and - not skip_while(first, buffer.end(), [](Codepoint c) - { return not is_word(c); })) + ((flags & ObjectFlags::Inner) or + not skip_while(first, buffer.end(), [](Codepoint c) + { return not is_word(c); }))) return selection; Utf8Iterator last = first;