blob: a6a191210d73c40d6100f5f207c2655de7dd2a36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
//go:build windows
package main
import (
"os"
"golang.org/x/sys/windows"
)
func init() {
con := windows.Handle(os.Stdin.Fd())
var mode uint32
if err := windows.GetConsoleMode(con, &mode); err == nil {
mode |= windows.ENABLE_EXTENDED_FLAGS
mode &^= windows.ENABLE_QUICK_EDIT_MODE
_ = windows.SetConsoleMode(con, mode)
}
}
|