diff --git a/clients/terminal.c b/clients/terminal.c index 782f087b..aa072cd7 100644 --- a/clients/terminal.c +++ b/clients/terminal.c @@ -2268,6 +2268,9 @@ static int wordsep(int ch) { const char extra[] = "-,./?%&#:_=+@~"; + if (ch > 127) + return 1; + return ch == 0 || !(isalpha(ch) || isdigit(ch) || strchr(extra, ch)); }