diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-10-03 20:01:37 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-10-03 20:01:37 +0100 |
| commit | a51d5a10469bc5a555c58745f1f61880990ea4f7 (patch) | |
| tree | bcf19b8d22da88c863367ecc70ac5b50eae17ca9 /src | |
| parent | c7356c8e9c28de0f76895a0436246a462b3f98e2 (diff) | |
Do not select the next word for inner word.
Diffstat (limited to 'src')
| -rw-r--r-- | src/selectors.hh | 5 |
1 files 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<word_type>(*first) and - not skip_while(first, buffer.end(), [](Codepoint c) - { return not is_word<word_type>(c); })) + ((flags & ObjectFlags::Inner) or + not skip_while(first, buffer.end(), [](Codepoint c) + { return not is_word<word_type>(c); }))) return selection; Utf8Iterator last = first; |
