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;