diff options
Diffstat (limited to 'editors/vi.c')
-rw-r--r-- | editors/vi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/editors/vi.c b/editors/vi.c index b54dd98dc..26487bee6 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -353,7 +353,9 @@ struct globals { | |||
353 | #if ENABLE_FEATURE_VI_USE_SIGNALS | 353 | #if ENABLE_FEATURE_VI_USE_SIGNALS |
354 | sigjmp_buf restart; // catch_sig() | 354 | sigjmp_buf restart; // catch_sig() |
355 | #endif | 355 | #endif |
356 | #if !ENABLE_PLATFORM_MINGW32 | ||
356 | struct termios term_orig; // remember what the cooked mode was | 357 | struct termios term_orig; // remember what the cooked mode was |
358 | #endif | ||
357 | #if ENABLE_FEATURE_VI_COLON | 359 | #if ENABLE_FEATURE_VI_COLON |
358 | char *initial_cmds[3]; // currently 2 entries, NULL terminated | 360 | char *initial_cmds[3]; // currently 2 entries, NULL terminated |
359 | #endif | 361 | #endif |
@@ -2738,15 +2740,19 @@ static char *swap_context(char *p) // goto new context for '' command make this | |||
2738 | //----- Set terminal attributes -------------------------------- | 2740 | //----- Set terminal attributes -------------------------------- |
2739 | static void rawmode(void) | 2741 | static void rawmode(void) |
2740 | { | 2742 | { |
2743 | #if !ENABLE_PLATFORM_MINGW32 | ||
2741 | // no TERMIOS_CLEAR_ISIG: leave ISIG on - allow signals | 2744 | // no TERMIOS_CLEAR_ISIG: leave ISIG on - allow signals |
2742 | set_termios_to_raw(STDIN_FILENO, &term_orig, TERMIOS_RAW_CRNL); | 2745 | set_termios_to_raw(STDIN_FILENO, &term_orig, TERMIOS_RAW_CRNL); |
2743 | erase_char = term_orig.c_cc[VERASE]; | 2746 | erase_char = term_orig.c_cc[VERASE]; |
2747 | #endif | ||
2744 | } | 2748 | } |
2745 | 2749 | ||
2746 | static void cookmode(void) | 2750 | static void cookmode(void) |
2747 | { | 2751 | { |
2748 | fflush_all(); | 2752 | fflush_all(); |
2753 | #if !ENABLE_PLATFORM_MINGW32 | ||
2749 | tcsetattr_stdin_TCSANOW(&term_orig); | 2754 | tcsetattr_stdin_TCSANOW(&term_orig); |
2755 | #endif | ||
2750 | } | 2756 | } |
2751 | 2757 | ||
2752 | #if ENABLE_FEATURE_VI_USE_SIGNALS | 2758 | #if ENABLE_FEATURE_VI_USE_SIGNALS |