comparison src/term.c @ 20437:3bb4dea4a164 v8.2.0773

patch 8.2.0773: switching to raw mode every time ":" is used Commit: https://github.com/vim/vim/commit/3b1f18f785f67c6cd110498c366e4d0c0fe11f27 Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 16 23:15:08 2020 +0200 patch 8.2.0773: switching to raw mode every time ":" is used Problem: Switching to raw mode every time ":" is used. Solution: When executing a shell set cur_tmode to TMODE_UNKNOWN, so that the next time TMODE_RAW is used it is set, but not every time.
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 May 2020 23:30:03 +0200
parents 426ef48be465
children d4b2a8675b78
comparison
equal deleted inserted replaced
20436:d64dba8d8a9d 20437:3bb4dea4a164
2860 if (n >= 8 && t_colors >= 16 2860 if (n >= 8 && t_colors >= 16
2861 && ((s[0] == ESC && s[1] == '[') 2861 && ((s[0] == ESC && s[1] == '[')
2862 #if defined(FEAT_VTP) && defined(FEAT_TERMGUICOLORS) 2862 #if defined(FEAT_VTP) && defined(FEAT_TERMGUICOLORS)
2863 || (s[0] == ESC && s[1] == '|') 2863 || (s[0] == ESC && s[1] == '|')
2864 #endif 2864 #endif
2865 || (s[0] == CSI && (i = 1) == 1)) 2865 || (s[0] == CSI && (i = 1) == 1))
2866 && s[i] != NUL 2866 && s[i] != NUL
2867 && (STRCMP(s + i + 1, "%p1%dm") == 0 2867 && (STRCMP(s + i + 1, "%p1%dm") == 0
2868 || STRCMP(s + i + 1, "%dm") == 0) 2868 || STRCMP(s + i + 1, "%dm") == 0)
2869 && (s[i] == '3' || s[i] == '4')) 2869 && (s[i] == '3' || s[i] == '4'))
2870 { 2870 {
3445 #endif 3445 #endif
3446 3446
3447 if (full_screen) 3447 if (full_screen)
3448 { 3448 {
3449 /* 3449 /*
3450 * When returning after calling a shell we want to really set the 3450 * When returning after calling a shell cur_tmode is TMODE_UNKNOWN,
3451 * terminal to raw mode, even though we think it already is, because 3451 * set the terminal to raw mode, even though we think it already is,
3452 * the shell program may have reset the terminal mode. 3452 * because the shell program may have reset the terminal mode.
3453 * When we think the terminal is normal, don't try to set it to 3453 * When we think the terminal is normal, don't try to set it to
3454 * normal again, because that causes problems (logout!) on some 3454 * normal again, because that causes problems (logout!) on some
3455 * machines. 3455 * machines.
3456 */ 3456 */
3457 if (tmode != TMODE_COOK || cur_tmode != TMODE_COOK) 3457 if (tmode != cur_tmode)
3458 { 3458 {
3459 #ifdef FEAT_TERMRESPONSE 3459 #ifdef FEAT_TERMRESPONSE
3460 # ifdef FEAT_GUI 3460 # ifdef FEAT_GUI
3461 if (!gui.in_use && !gui.starting) 3461 if (!gui.in_use && !gui.starting)
3462 # endif 3462 # endif