Cygwin: console: Disable xterm mode for non cygwin process only.
- Special function keys such as arrow keys or function keys do not
work in ConEmu with cygwin-connector after commit
6a06c6bc8f
. This patch fixes the
issue.
This commit is contained in:
committed by
Corinna Vinschen
parent
bb30582a99
commit
d7478090d6
@@ -610,7 +610,26 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
|
||||
}
|
||||
}
|
||||
else if (fh && fh->get_major () == DEV_CONS_MAJOR)
|
||||
attach_to_console = true;
|
||||
{
|
||||
attach_to_console = true;
|
||||
if (wincap.has_con_24bit_colors () && !iscygwin ())
|
||||
{
|
||||
DWORD dwMode;
|
||||
if (fd == 0)
|
||||
{
|
||||
/* Disable xterm compatible mode in input */
|
||||
GetConsoleMode (fh->get_handle (), &dwMode);
|
||||
dwMode &= ~ENABLE_VIRTUAL_TERMINAL_INPUT;
|
||||
SetConsoleMode (fh->get_handle (), dwMode);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetConsoleMode (fh->get_output_handle (), &dwMode);
|
||||
dwMode &= ~ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
||||
SetConsoleMode (fh->get_output_handle (), dwMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Set up needed handles for stdio */
|
||||
|
Reference in New Issue
Block a user