Mercurial > vim
comparison src/testdir/test_termcodes.vim @ 20850:bf7453768034 v8.2.0977
patch 8.2.0977: t_8u is made empty for the wrong terminals
Commit: https://github.com/vim/vim/commit/8dff4cbf6d917e20322821e8e866ffc1c1175258
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 14 14:34:16 2020 +0200
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 https://github.com/vim/vim/issues/6254)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 14 Jun 2020 14:45:03 +0200 |
parents | 2616c5a337e0 |
children | d0265fdadec9 |
comparison
equal
deleted
inserted
replaced
20849:a13abf01e8cd | 20850:bf7453768034 |
---|---|
1011 " Termresponse is only parsed when t_RV is not empty. | 1011 " Termresponse is only parsed when t_RV is not empty. |
1012 set t_RV=x | 1012 set t_RV=x |
1013 call test_override('term_props', 1) | 1013 call test_override('term_props', 1) |
1014 | 1014 |
1015 set ttymouse=xterm | 1015 set ttymouse=xterm |
1016 " t_8u is not reset | |
1017 let &t_8u = "\<Esc>[58;2;%lu;%lu;%lum" | |
1016 call test_option_not_set('ttymouse') | 1018 call test_option_not_set('ttymouse') |
1017 let seq = "\<Esc>[>1;95;0c" | 1019 let seq = "\<Esc>[>1;95;0c" |
1018 call feedkeys(seq, 'Lx!') | 1020 call feedkeys(seq, 'Lx!') |
1019 call assert_equal(seq, v:termresponse) | 1021 call assert_equal(seq, v:termresponse) |
1020 call assert_equal('sgr', &ttymouse) | 1022 call assert_equal('sgr', &ttymouse) |
1023 \ cursor_style: 'n', | 1025 \ cursor_style: 'n', |
1024 \ cursor_blink_mode: 'u', | 1026 \ cursor_blink_mode: 'u', |
1025 \ underline_rgb: 'y', | 1027 \ underline_rgb: 'y', |
1026 \ mouse: 's' | 1028 \ mouse: 's' |
1027 \ }, terminalprops()) | 1029 \ }, terminalprops()) |
1030 call assert_equal("\<Esc>[58;2;%lu;%lu;%lum", &t_8u) | |
1028 | 1031 |
1029 " Reset is_not_xterm and is_mac_terminal. | 1032 " Reset is_not_xterm and is_mac_terminal. |
1030 set t_RV= | 1033 set t_RV= |
1031 set term=xterm | 1034 set term=xterm |
1032 set t_RV=x | 1035 set t_RV=x |
1156 \ cursor_blink_mode: 'u', | 1159 \ cursor_blink_mode: 'u', |
1157 \ underline_rgb: 'u', | 1160 \ underline_rgb: 'u', |
1158 \ mouse: 's' | 1161 \ mouse: 's' |
1159 \ }, terminalprops()) | 1162 \ }, terminalprops()) |
1160 | 1163 |
1161 " xterm >= 279: "sgr" and cursor_style not reset | 1164 " xterm >= 279: "sgr" and cursor_style not reset; also check t_8u reset |
1162 set ttymouse=xterm | 1165 set ttymouse=xterm |
1163 call test_option_not_set('ttymouse') | 1166 call test_option_not_set('ttymouse') |
1167 let &t_8u = "\<Esc>[58;2;%lu;%lu;%lum" | |
1164 let seq = "\<Esc>[>0;279;0c" | 1168 let seq = "\<Esc>[>0;279;0c" |
1165 call feedkeys(seq, 'Lx!') | 1169 call feedkeys(seq, 'Lx!') |
1166 call assert_equal(seq, v:termresponse) | 1170 call assert_equal(seq, v:termresponse) |
1167 call assert_equal('sgr', &ttymouse) | 1171 call assert_equal('sgr', &ttymouse) |
1168 | 1172 |
1170 \ cursor_style: 'u', | 1174 \ cursor_style: 'u', |
1171 \ cursor_blink_mode: 'u', | 1175 \ cursor_blink_mode: 'u', |
1172 \ underline_rgb: 'u', | 1176 \ underline_rgb: 'u', |
1173 \ mouse: 's' | 1177 \ mouse: 's' |
1174 \ }, terminalprops()) | 1178 \ }, terminalprops()) |
1179 call assert_equal('', &t_8u) | |
1175 | 1180 |
1176 set t_RV= | 1181 set t_RV= |
1177 call test_override('term_props', 0) | 1182 call test_override('term_props', 0) |
1178 endfunc | 1183 endfunc |
1179 | 1184 |