summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-08-26 12:26:07 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-26 12:26:07 +0100
commitd55f9ef8b2f1e9f868ed1440fe859d1b18b1cfe8 (patch)
tree10194bbcb1de5657bead5eb593d50b197d7b93ae /src
parentb1d2c8116cb5577961ea109651fb888b5e58265f (diff)
downloadvim-git-d55f9ef8b2f1e9f868ed1440fe859d1b18b1cfe8.tar.gz
patch 9.0.0273: Konsole termresponse not recognizedv9.0.0273
Problem: Konsole termresponse not recognized. Solution: Handle Konsole like libvterm, set 'ttymouse' to "sgr". (closes #10990)
Diffstat (limited to 'src')
-rw-r--r--src/term.c3
-rw-r--r--src/testdir/test_termcodes.vim25
-rw-r--r--src/version.c2
3 files changed, 20 insertions, 10 deletions
diff --git a/src/term.c b/src/term.c
index f9cc4a5ed..a92293850 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4715,7 +4715,8 @@ handle_version_response(int first, int *arg, int argc, char_u *tp)
}
// libvterm sends 0;100;0
- if (version == 100 && arg[0] == 0 && arg[2] == 0)
+ // Konsole sends 0;115;0 and works the same way
+ if ((version == 100 || version == 115) && arg[0] == 0 && arg[2] == 0)
{
// If run from Vim $COLORS is set to the number of
// colors the terminal supports. Otherwise assume
diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim
index 6e4bbd19c..578c97018 100644
--- a/src/testdir/test_termcodes.vim
+++ b/src/testdir/test_termcodes.vim
@@ -1664,17 +1664,10 @@ func Test_xx02_iTerm2_response()
call test_override('term_props', 0)
endfunc
-" This checks the libvterm version response.
-" This must be after other tests, because it has side effects to xterm
-" properties.
-func Test_xx03_libvterm_response()
- " Termresponse is only parsed when t_RV is not empty.
- set t_RV=x
- call test_override('term_props', 1)
-
+func Run_libvterm_konsole_response(code)
set ttymouse=xterm
call test_option_not_set('ttymouse')
- let seq = "\<Esc>[>0;100;0c"
+ let seq = "\<Esc>[>0;" .. a:code .. ";0c"
call feedkeys(seq, 'Lx!')
call assert_equal(seq, v:termresponse)
call assert_equal('sgr', &ttymouse)
@@ -1685,6 +1678,20 @@ func Test_xx03_libvterm_response()
\ underline_rgb: 'u',
\ mouse: 's'
\ }, terminalprops())
+endfunc
+
+" This checks the libvterm version response.
+" This must be after other tests, because it has side effects to xterm
+" properties.
+func Test_xx03_libvterm_konsole_response()
+ " Termresponse is only parsed when t_RV is not empty.
+ set t_RV=x
+ call test_override('term_props', 1)
+
+ " libvterm
+ call Run_libvterm_konsole_response(100)
+ " Konsole
+ call Run_libvterm_konsole_response(115)
set t_RV=
call test_override('term_props', 0)
diff --git a/src/version.c b/src/version.c
index ff452da1f..291e40af6 100644
--- a/src/version.c
+++ b/src/version.c
@@ -724,6 +724,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 273,
+/**/
272,
/**/
271,