We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c5d9a2b + 770038b commit 12126edCopy full SHA for 12126ed
color_windows.go
@@ -11,8 +11,9 @@ func init() {
11
// https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences#output-sequences
12
var outMode uint32
13
out := windows.Handle(os.Stdout.Fd())
14
- if err := windows.GetConsoleMode(out, &outMode); err == nil {
15
- outMode |= windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING
16
- _ = windows.SetConsoleMode(out, outMode)
+ if err := windows.GetConsoleMode(out, &outMode); err != nil {
+ return
17
}
+ outMode |= windows.ENABLE_PROCESSED_OUTPUT | windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING
18
+ _ = windows.SetConsoleMode(out, outMode)
19
0 commit comments