Consistency-fix for word motions (#7354)

* change word motion test to include start cursor in specification

* add test case for bug

* fix bug
This commit is contained in:
sgrj
2020-09-27 15:34:34 +02:00
committed by GitHub
parent adb1f993a7
commit ab2cb03189
2 changed files with 19 additions and 12 deletions

View File

@@ -687,8 +687,11 @@ bool move_word_state_machine_t::consume_char_punctuation(wchar_t c) {
consumed = true;
if (iswspace(c)) {
state = s_whitespace;
} else if (iswalnum(c)) {
state = s_alphanumeric;
} else {
// Don't allow switching type (ws->nonws) after non-whitespace.
// Don't allow switching type (ws->nonws) after non-whitespace and
// non-alphanumeric.
state = s_rest;
}
break;