summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-04-20 19:55:37 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-20 19:55:37 +0100
commitd0eaf675aa1f00bf7a10fd15b562098530a94991 (patch)
treef04ef46fbb888df4cf93aa276037e07ce0d40623
parent0044e5100a0e76a0bc1ea18c63a432c20428de5e (diff)
downloadvim-git-d0eaf675aa1f00bf7a10fd15b562098530a94991.tar.gz
patch 8.2.4800: missing test update for adjusted t_8u behaviorv8.2.4800
Problem: Missing test update for adjusted t_8u behavior. Solution: Update and extend the test.
-rw-r--r--src/testdir/test_termcodes.vim42
-rw-r--r--src/version.c2
2 files changed, 28 insertions, 16 deletions
diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim
index 661917228..6e4bbd19c 100644
--- a/src/testdir/test_termcodes.vim
+++ b/src/testdir/test_termcodes.vim
@@ -1783,6 +1783,28 @@ func Test_xx06_screen_response()
call test_override('term_props', 0)
endfunc
+func Do_check_t_8u_set_reset(set_by_user)
+ set ttymouse=xterm
+ call test_option_not_set('ttymouse')
+ let default_value = "\<Esc>[58;2;%lu;%lu;%lum"
+ let &t_8u = default_value
+ if !a:set_by_user
+ call test_option_not_set('t_8u')
+ endif
+ let seq = "\<Esc>[>0;279;0c"
+ call feedkeys(seq, 'Lx!')
+ call assert_equal(seq, v:termresponse)
+ call assert_equal('sgr', &ttymouse)
+
+ call assert_equal(#{
+ \ cursor_style: 'u',
+ \ cursor_blink_mode: 'u',
+ \ underline_rgb: 'u',
+ \ mouse: 's'
+ \ }, terminalprops())
+ call assert_equal(a:set_by_user ? default_value : '', &t_8u)
+endfunc
+
" This checks the xterm version response.
" This must be after other tests, because it has side effects to xterm
" properties.
@@ -1847,22 +1869,10 @@ func Test_xx07_xterm_response()
\ mouse: 's'
\ }, terminalprops())
- " xterm >= 279: "sgr" and cursor_style not reset; also check t_8u reset
- set ttymouse=xterm
- call test_option_not_set('ttymouse')
- let &t_8u = "\<Esc>[58;2;%lu;%lu;%lum"
- let seq = "\<Esc>[>0;279;0c"
- call feedkeys(seq, 'Lx!')
- call assert_equal(seq, v:termresponse)
- call assert_equal('sgr', &ttymouse)
-
- call assert_equal(#{
- \ cursor_style: 'u',
- \ cursor_blink_mode: 'u',
- \ underline_rgb: 'u',
- \ mouse: 's'
- \ }, terminalprops())
- call assert_equal('', &t_8u)
+ " xterm >= 279: "sgr" and cursor_style not reset; also check t_8u reset,
+ " except when it was set by the user
+ call Do_check_t_8u_set_reset(0)
+ call Do_check_t_8u_set_reset(1)
set t_RV=
call test_override('term_props', 0)
diff --git a/src/version.c b/src/version.c
index 447bbd880..4c194559d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 4800,
+/**/
4799,
/**/
4798,