aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--win32/winansi.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/win32/winansi.c b/win32/winansi.c
index e36f7565b..ad6016ddc 100644
--- a/win32/winansi.c
+++ b/win32/winansi.c
@@ -735,7 +735,6 @@ int mingw_isatty(int fd)
735 735
736 if (result) { 736 if (result) {
737 HANDLE handle = (HANDLE) _get_osfhandle(fd); 737 HANDLE handle = (HANDLE) _get_osfhandle(fd);
738 CONSOLE_SCREEN_BUFFER_INFO sbi;
739 DWORD mode; 738 DWORD mode;
740 739
741 if (handle == INVALID_HANDLE_VALUE) 740 if (handle == INVALID_HANDLE_VALUE)
@@ -745,10 +744,7 @@ int mingw_isatty(int fd)
745 if (GetFileType(handle) != FILE_TYPE_CHAR) 744 if (GetFileType(handle) != FILE_TYPE_CHAR)
746 return 0; 745 return 0;
747 746
748 if (!fd) { 747 if (!GetConsoleMode(handle, &mode))
749 if (!GetConsoleMode(handle, &mode))
750 return 0;
751 } else if (!GetConsoleScreenBufferInfo(handle, &sbi))
752 return 0; 748 return 0;
753 } 749 }
754 750