Fix color output for non-256 color terminals

The function enableVirtualTerminalProcessing must return an error if
virtual terminal processing (only applicable on Windows) was not
enabled, otherwise we assume that the terminal supports both 256-color
and truecolor.

We have been erroneously assuming that all non-Windows terminals are
256-color and sending escape sequences to those that cannot intepret
them. This led to some parts of Survey prompts being invisible on old
terminals.

Regressed in be4b392530
This commit is contained in:
Mislav Marohnić 2022-09-27 19:50:05 +02:00
parent ec49359467
commit efe504eefc

View file

@ -3,6 +3,8 @@
package iostreams
import "errors"
func enableVirtualTerminalProcessing(fd uintptr) error {
return nil
return errors.New("not implemented")
}