Skip to content

Commit

Permalink
chore(term): remove duplicate ENABLE_PROCESSED_OUTPUT flag
Browse files Browse the repository at this point in the history
Windows MakeRaw only works on input buffers plus the value of
ENABLE_PROCESSED_INPUT is the same as ENABLE_PROCESSED_OUTPUT.
  • Loading branch information
aymanbagabas committed Feb 4, 2025
1 parent f44d1a0 commit 49d665c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion term/term_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func makeRaw(fd uintptr) (*State, error) {
if err := windows.GetConsoleMode(windows.Handle(fd), &st); err != nil {
return nil, err
}
raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT)
raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT)
raw |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT
if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil {
return nil, err
Expand Down

0 comments on commit 49d665c

Please sign in to comment.