vala: correctly judge whether to color output on windows
close #1383 (closed)
On windows, we should use _isatty
instead of isatty
. Also, the result of the function may be integers other than 0
and 1
, so we need to convert it to bool instead of use func (pat) == 1
.
Edited by Zhou Qiankang