From 658e8b4f8c8d56f690e34672aa1baa86f8de7de8 Mon Sep 17 00:00:00 2001 From: Alexey Lapshin Date: Thu, 18 Aug 2022 17:43:28 +0400 Subject: [PATCH] readline: fix windows control characters behavior --- readline/readline/terminal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readline/readline/terminal.c b/readline/readline/terminal.c index 9997161f818..2c02fcf5589 100644 --- a/readline/readline/terminal.c +++ b/readline/readline/terminal.c @@ -484,7 +484,7 @@ _rl_init_terminal_io (const char *terminal_name) reset_region_colors = 1; -#ifdef __MSDOS__ +#if defined(__MSDOS__) || defined(__MINGW32__) _rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL; _rl_term_up = _rl_term_dc = _rl_term_DC = _rl_visible_bell = (char *)NULL; _rl_term_ku = _rl_term_kd = _rl_term_kl = _rl_term_kr = (char *)NULL; @@ -502,7 +502,7 @@ _rl_init_terminal_io (const char *terminal_name) #endif _rl_get_screen_size (tty, 0); -#else /* !__MSDOS__ */ +#else /* defined(__MSDOS__) || defined(__MINGW32__) */ /* I've separated this out for later work on not calling tgetent at all if the calling application has supplied a custom redisplay function, (and possibly if the application has supplied a custom input function). */ @@ -613,7 +613,7 @@ _rl_init_terminal_io (const char *terminal_name) term_has_meta = TGETFLAG ("km"); if (term_has_meta == 0) _rl_term_mm = _rl_term_mo = (char *)NULL; -#endif /* !__MSDOS__ */ +#endif /* defined(__MSDOS__) || defined(__MINGW32__) */ /* Attempt to find and bind the arrow keys. Do not override already bound keys in an overzealous attempt, however. */