aboutsummaryrefslogtreecommitdiffstats
path: root/terms.c
diff options
context:
space:
mode:
Diffstat (limited to 'terms.c')
-rw-r--r--terms.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/terms.c b/terms.c
index 7a3c987..ca81d28 100644
--- a/terms.c
+++ b/terms.c
@@ -222,6 +222,7 @@ static void
check_cygwin_console(void)
{
char *term = getenv("TERM");
+ char *ctype;
HANDLE hWnd;
if (term == NULL)
@@ -236,7 +237,9 @@ check_cygwin_console(void)
isLocalConsole = 1;
}
}
- if (strncmp(getenv("LANG"), "ja", 2) == 0) {
+ if (((ctype = getenv("LC_ALL")) ||
+ (ctype = getenv("LC_CTYPE")) ||
+ (ctype = getenv("LANG"))) && strncmp(ctype, "ja", 2) == 0) {
isWinConsole = TERM_CYGWIN_RESERVE_IME;
}
#ifdef SUPPORT_WIN9X_CONSOLE_MBCS
@@ -2027,8 +2030,8 @@ sleep_till_anykey(int sec, int purge)
#ifdef USE_MOUSE
-#define XTERM_ON {fputs("\033[?1001s\033[?1000h",ttyf); flush_tty();}
-#define XTERM_OFF {fputs("\033[?1000l\033[?1001r",ttyf); flush_tty();}
+#define XTERM_ON {fputs("\033[?1001s\033[?1000h\033[?1006h",ttyf); flush_tty();}
+#define XTERM_OFF {fputs("\033[?1006l\033[?1000l\033[?1001r",ttyf); flush_tty();}
#define CYGWIN_ON {fputs("\033[?1000h",ttyf); flush_tty();}
#define CYGWIN_OFF {fputs("\033[?1000l",ttyf); flush_tty();}