From 751eba0e686d8d62e889827abc11fdd8e9a87a1c Mon Sep 17 00:00:00 2001 From: greatroar <@> Date: Sat, 29 Feb 2020 17:37:36 +0100 Subject: [PATCH] Remove unnecessary pipe checks in termstatus canUpdateStatus has already determined that the file descriptor is not a pipe. --- internal/ui/termstatus/terminal_windows.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/internal/ui/termstatus/terminal_windows.go b/internal/ui/termstatus/terminal_windows.go index fbd099497..b6331619c 100644 --- a/internal/ui/termstatus/terminal_windows.go +++ b/internal/ui/termstatus/terminal_windows.go @@ -19,12 +19,6 @@ func clearCurrentLine(wr io.Writer, fd uintptr) func(io.Writer, uintptr) { return windowsClearCurrentLine } - // check if the output file type is a pipe (0x0003) - if isPipe(fd) { - // return empty func, update state is not possible on this terminal - return func(io.Writer, uintptr) {} - } - // assume we're running in mintty/cygwin return posixClearCurrentLine } @@ -36,12 +30,6 @@ func moveCursorUp(wr io.Writer, fd uintptr) func(io.Writer, uintptr, int) { return windowsMoveCursorUp } - // check if the output file type is a pipe (0x0003) - if isPipe(fd) { - // return empty func, update state is not possible on this terminal - return func(io.Writer, uintptr, int) {} - } - // assume we're running in mintty/cygwin return posixMoveCursorUp }