aboutsummaryrefslogtreecommitdiff
path: root/cmd/atlas/main_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/atlas/main_windows.go')
-rw-r--r--cmd/atlas/main_windows.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/cmd/atlas/main_windows.go b/cmd/atlas/main_windows.go
new file mode 100644
index 0000000..a6a1912
--- /dev/null
+++ b/cmd/atlas/main_windows.go
@@ -0,0 +1,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)
+ }
+}