1
0
forked from aniani/vim

patch 8.1.2169: terminal flags are never reset

Problem:    Terminal flags are never reset.
Solution:   Reset the flags when setting 'term'.
This commit is contained in:
Bram Moolenaar
2019-10-17 21:55:24 +02:00
parent b1ba9abcb3
commit 3cea8a9a51
3 changed files with 15 additions and 0 deletions

View File

@@ -1957,6 +1957,8 @@ set_termname(char_u *term)
#if defined(UNIX) || defined(VMS) #if defined(UNIX) || defined(VMS)
term_is_xterm = vim_is_xterm(term); term_is_xterm = vim_is_xterm(term);
#endif #endif
is_not_xterm = FALSE;
is_mac_terminal = FALSE;
#ifdef FEAT_MOUSE #ifdef FEAT_MOUSE
# if defined(UNIX) || defined(VMS) # if defined(UNIX) || defined(VMS)

View File

@@ -906,7 +906,18 @@ func Test_xx03_xterm_response()
" Termresponse is only parsed when t_RV is not empty. " Termresponse is only parsed when t_RV is not empty.
set t_RV=x set t_RV=x
" Do Terminal.app first to check that is_mac_terminal is reset.
set ttymouse=xterm
call test_option_not_set('ttymouse')
let seq = "\<Esc>[>1;95;0c"
call feedkeys(seq, 'Lx!')
call assert_equal(seq, v:termresponse)
call assert_equal('sgr', &ttymouse)
" xterm < 95: "xterm" (actually unmodified) " xterm < 95: "xterm" (actually unmodified)
set t_RV=
set term=xterm
set t_RV=x
set ttymouse=xterm set ttymouse=xterm
call test_option_not_set('ttymouse') call test_option_not_set('ttymouse')
let seq = "\<Esc>[>0;94;0c" let seq = "\<Esc>[>0;94;0c"

View File

@@ -753,6 +753,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
2169,
/**/ /**/
2168, 2168,
/**/ /**/