From e0a2b1906b8a3d7f99b4b5b54588cc37f904c29a Mon Sep 17 00:00:00 2001 From: Gunjan Vyas Date: Thu, 25 Jan 2024 14:50:09 +0530 Subject: [PATCH] windows print: enable virtual terminal processing --- v3/termutil/term_win.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/v3/termutil/term_win.go b/v3/termutil/term_win.go index 75c7e2c..99397a0 100644 --- a/v3/termutil/term_win.go +++ b/v3/termutil/term_win.go @@ -138,9 +138,8 @@ func lockEcho() (err error) { } newState := oldState - const ENABLE_ECHO_INPUT = 0x0004 const ENABLE_LINE_INPUT = 0x0002 - newState = newState & (^(ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT)) + newState = newState & (^ENABLE_LINE_INPUT) if _, _, e := syscall.Syscall(setConsoleMode.Addr(), 2, uintptr(syscall.Stdout), uintptr(newState), 0); e != 0 { err = fmt.Errorf("Can't set terminal settings: %v", e) return