diff --git a/watch.c b/watch.c index 46498447..e4543082 100644 --- a/watch.c +++ b/watch.c @@ -53,6 +53,7 @@ #include #ifdef WITH_WATCH8BIT # include +# include # include #else # include @@ -438,8 +439,8 @@ int run_command(char *restrict command, char **restrict command_argv) c = carry; carry = WEOF; } - } while (c != WEOF && !isprint(c) - && c < 12 + } while (c != WEOF && !iswprint(c) + && c < 128 && wcwidth(c) == 0 && c != L'\n' && c != L'\t'