Do not select the next word for inner word.

This commit is contained in:
Maxime Coste 2016-10-03 20:01:37 +01:00
parent c7356c8e9c
commit a51d5a1046

View File

@ -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<word_type>(*first) and
((flags & ObjectFlags::Inner) or
not skip_while(first, buffer.end(), [](Codepoint c)
{ return not is_word<word_type>(c); }))
{ return not is_word<word_type>(c); })))
return selection;
Utf8Iterator last = first;