patch 8.2.0977: t_8u is made empty for the wrong terminals
Problem: t_8u is made empty for the wrong terminals. (Dominique Pelle) Solution: Invert the check for TPR_YES. (closes #6254)
This commit is contained in:
@ -4637,6 +4637,7 @@ handle_version_response(int first, int *arg, int argc, char_u *tp)
|
|||||||
// "xterm-256color" but are not fully xterm compatible.
|
// "xterm-256color" but are not fully xterm compatible.
|
||||||
//
|
//
|
||||||
// Gnome terminal sends 1;3801;0, 1;4402;0 or 1;2501;0.
|
// Gnome terminal sends 1;3801;0, 1;4402;0 or 1;2501;0.
|
||||||
|
// Newer Gnome-terminal sends 65;6001;1.
|
||||||
// xfce4-terminal sends 1;2802;0.
|
// xfce4-terminal sends 1;2802;0.
|
||||||
// screen sends 83;40500;0
|
// screen sends 83;40500;0
|
||||||
// Assuming any version number over 2500 is not an
|
// Assuming any version number over 2500 is not an
|
||||||
@ -4688,7 +4689,7 @@ handle_version_response(int first, int *arg, int argc, char_u *tp)
|
|||||||
|
|
||||||
// Unless the underline RGB color is expected to work, disable "t_8u".
|
// Unless the underline RGB color is expected to work, disable "t_8u".
|
||||||
// It does not work for the real Xterm, it resets the background color.
|
// It does not work for the real Xterm, it resets the background color.
|
||||||
if (term_props[TPR_UNDERLINE_RGB].tpr_status == TPR_YES && *T_8U != NUL)
|
if (term_props[TPR_UNDERLINE_RGB].tpr_status != TPR_YES && *T_8U != NUL)
|
||||||
T_8U = empty_option;
|
T_8U = empty_option;
|
||||||
|
|
||||||
// Only set 'ttymouse' automatically if it was not set
|
// Only set 'ttymouse' automatically if it was not set
|
||||||
|
|||||||
@ -1013,6 +1013,8 @@ func Test_xx04_Mac_Terminal_response()
|
|||||||
call test_override('term_props', 1)
|
call test_override('term_props', 1)
|
||||||
|
|
||||||
set ttymouse=xterm
|
set ttymouse=xterm
|
||||||
|
" t_8u is not reset
|
||||||
|
let &t_8u = "\<Esc>[58;2;%lu;%lu;%lum"
|
||||||
call test_option_not_set('ttymouse')
|
call test_option_not_set('ttymouse')
|
||||||
let seq = "\<Esc>[>1;95;0c"
|
let seq = "\<Esc>[>1;95;0c"
|
||||||
call feedkeys(seq, 'Lx!')
|
call feedkeys(seq, 'Lx!')
|
||||||
@ -1025,6 +1027,7 @@ func Test_xx04_Mac_Terminal_response()
|
|||||||
\ underline_rgb: 'y',
|
\ underline_rgb: 'y',
|
||||||
\ mouse: 's'
|
\ mouse: 's'
|
||||||
\ }, terminalprops())
|
\ }, terminalprops())
|
||||||
|
call assert_equal("\<Esc>[58;2;%lu;%lu;%lum", &t_8u)
|
||||||
|
|
||||||
" Reset is_not_xterm and is_mac_terminal.
|
" Reset is_not_xterm and is_mac_terminal.
|
||||||
set t_RV=
|
set t_RV=
|
||||||
@ -1158,9 +1161,10 @@ func Test_xx07_xterm_response()
|
|||||||
\ mouse: 's'
|
\ mouse: 's'
|
||||||
\ }, terminalprops())
|
\ }, terminalprops())
|
||||||
|
|
||||||
" xterm >= 279: "sgr" and cursor_style not reset
|
" xterm >= 279: "sgr" and cursor_style not reset; also check t_8u reset
|
||||||
set ttymouse=xterm
|
set ttymouse=xterm
|
||||||
call test_option_not_set('ttymouse')
|
call test_option_not_set('ttymouse')
|
||||||
|
let &t_8u = "\<Esc>[58;2;%lu;%lu;%lum"
|
||||||
let seq = "\<Esc>[>0;279;0c"
|
let seq = "\<Esc>[>0;279;0c"
|
||||||
call feedkeys(seq, 'Lx!')
|
call feedkeys(seq, 'Lx!')
|
||||||
call assert_equal(seq, v:termresponse)
|
call assert_equal(seq, v:termresponse)
|
||||||
@ -1172,6 +1176,7 @@ func Test_xx07_xterm_response()
|
|||||||
\ underline_rgb: 'u',
|
\ underline_rgb: 'u',
|
||||||
\ mouse: 's'
|
\ mouse: 's'
|
||||||
\ }, terminalprops())
|
\ }, terminalprops())
|
||||||
|
call assert_equal('', &t_8u)
|
||||||
|
|
||||||
set t_RV=
|
set t_RV=
|
||||||
call test_override('term_props', 0)
|
call test_override('term_props', 0)
|
||||||
|
|||||||
@ -754,6 +754,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 */
|
||||||
|
/**/
|
||||||
|
977,
|
||||||
/**/
|
/**/
|
||||||
976,
|
976,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user