Skip to content

Commit

Permalink
windows print: enable virtual terminal processing
Browse files Browse the repository at this point in the history
  • Loading branch information
vyasgun committed Jan 25, 2024
1 parent f7e7374 commit e0a2b19
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions v3/termutil/term_win.go
Original file line number Diff line number Diff line change
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 e0a2b19

Please sign in to comment.