make miscchecks
This commit is contained in:
1 parent
af6ff40748
commit
1f27be076b
12 files changed
+274
-274
No files matched your search
+11
-11
@@ -176,19 +176,19 @@ static bool DetectWindowsAnsiSupport(void) {
|
||||
#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
|
||||
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
|
||||
#endif
|
||||
|
||||
// disable colors if stdin or stdout are redirected
|
||||
|
||||
// disable colors if stdin or stdout are redirected
|
||||
if ((! session.stdinOnTTY) || (! session.stdoutOnTTY))
|
||||
return false;
|
||||
|
||||
return false;
|
||||
|
||||
HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
DWORD dwMode = 0;
|
||||
GetConsoleMode(hOut, &dwMode);
|
||||
|
||||
//ENABLE_VIRTUAL_TERMINAL_PROCESSING is already set
|
||||
if((dwMode & ENABLE_VIRTUAL_TERMINAL_PROCESSING))
|
||||
return true;
|
||||
|
||||
|
||||
//ENABLE_VIRTUAL_TERMINAL_PROCESSING is already set
|
||||
if((dwMode & ENABLE_VIRTUAL_TERMINAL_PROCESSING))
|
||||
return true;
|
||||
|
||||
dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
||||
|
||||
return SetConsoleMode(hOut, dwMode) ? true : false;
|
||||
@@ -385,8 +385,8 @@ check_script:
|
||||
#ifdef HAVE_READLINE
|
||||
script_cmd = readline(prompt_filtered);
|
||||
#if defined(_WIN32)
|
||||
//Check if color support needs to be enabled again in case the window buffer did change
|
||||
session.supports_colors = DetectWindowsAnsiSupport();
|
||||
//Check if color support needs to be enabled again in case the window buffer did change
|
||||
session.supports_colors = DetectWindowsAnsiSupport();
|
||||
#endif
|
||||
if (script_cmd != NULL) {
|
||||
execCommand = true;
|
||||
|
||||
Reference in new issue
Block a user