Skip to content

Commit

Permalink
Merge pull request #214 from vyasgun/pr/enable-virtual-terminal-proce…
Browse files Browse the repository at this point in the history
…ssing

windows print: enable virtual terminal processing
  • Loading branch information
cheggaaa committed Jan 25, 2024
2 parents f7e7374 + e0a2b19 commit 85958a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions v3/termutil/term_win.go
Expand Up @@ -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
Expand Down

0 comments on commit 85958a1

Please sign in to comment.