mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-05 17:48:45 +00:00
parent
68ab016267
commit
8cf389baf2
1 changed files with 3 additions and 3 deletions
|
@ -815,8 +815,8 @@ bool move_word_state_machine_t::consume_char_whitespace(wchar_t c) {
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case s_always_one: {
|
case s_always_one: {
|
||||||
consumed = true; // always consume the first character
|
consumed = true; // always consume the first character
|
||||||
// If it's a graphical char, only consume those from here.
|
// If it's not whitespace, only consume those from here.
|
||||||
if (iswgraph(c)) {
|
if (!iswblank(c)) {
|
||||||
state = s_graph;
|
state = s_graph;
|
||||||
} else {
|
} else {
|
||||||
// If it's whitespace, keep consuming whitespace until the graphs.
|
// If it's whitespace, keep consuming whitespace until the graphs.
|
||||||
|
@ -833,7 +833,7 @@ bool move_word_state_machine_t::consume_char_whitespace(wchar_t c) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case s_graph: {
|
case s_graph: {
|
||||||
if (iswgraph(c)) {
|
if (!iswblank(c)) {
|
||||||
consumed = true; // consumed printable non-space
|
consumed = true; // consumed printable non-space
|
||||||
} else {
|
} else {
|
||||||
state = s_end;
|
state = s_end;
|
||||||
|
|
Loading…
Reference in a new issue