diff options
| author | Maxime Coste <mawww@kakoune.org> | 2018-11-27 18:13:29 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2018-11-27 18:16:21 +1100 |
| commit | 1553d91d278ff943c3545e3cb0728acbf4cf433d (patch) | |
| tree | 9d795b13e34e98199c005ba06bf6ffba8fec386a /src/selectors.cc | |
| parent | 6c54c4740d2144e897cad5b033ab160b3ab2ddff (diff) | |
Make '_' the default extra_word_chars, and remove built-in support
Fixes #2599
Diffstat (limited to 'src/selectors.cc')
| -rw-r--r-- | src/selectors.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/selectors.cc b/src/selectors.cc index 8320c0b0..47aef03c 100644 --- a/src/selectors.cc +++ b/src/selectors.cc @@ -63,6 +63,7 @@ select_to_next_word(const Context& context, const Selection& selection) Utf8Iterator end = begin+1; auto is_word = [&](Codepoint c) { return Kakoune::is_word<word_type>(c, extra_word_chars); }; + auto is_punctuation = [&](Codepoint c) { return Kakoune::is_punctuation(c, extra_word_chars); }; if (is_word(*begin)) skip_while(end, buffer.end(), is_word); @@ -96,6 +97,7 @@ select_to_next_word_end(const Context& context, const Selection& selection) skip_while(end, buffer.end(), is_horizontal_blank); auto is_word = [&](Codepoint c) { return Kakoune::is_word<word_type>(c, extra_word_chars); }; + auto is_punctuation = [&](Codepoint c) { return Kakoune::is_punctuation(c, extra_word_chars); }; if (is_word(*end)) skip_while(end, buffer.end(), is_word); @@ -124,6 +126,7 @@ select_to_previous_word(const Context& context, const Selection& selection) Utf8Iterator end = begin; auto is_word = [&](Codepoint c) { return Kakoune::is_word<word_type>(c, extra_word_chars); }; + auto is_punctuation = [&](Codepoint c) { return Kakoune::is_punctuation(c, extra_word_chars); }; bool with_end = skip_while_reverse(end, buffer.begin(), is_horizontal_blank); if (is_word(*end)) |
