mirror of
https://github.com/vim/vim.git
synced 2025-09-30 04:44:14 -04:00
patch 9.0.0273: Konsole termresponse not recognized
Problem: Konsole termresponse not recognized. Solution: Handle Konsole like libvterm, set 'ttymouse' to "sgr". (closes #10990)
This commit is contained in:
@@ -4715,7 +4715,8 @@ handle_version_response(int first, int *arg, int argc, char_u *tp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// libvterm sends 0;100;0
|
// 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
|
// If run from Vim $COLORS is set to the number of
|
||||||
// colors the terminal supports. Otherwise assume
|
// colors the terminal supports. Otherwise assume
|
||||||
|
@@ -1664,17 +1664,10 @@ func Test_xx02_iTerm2_response()
|
|||||||
call test_override('term_props', 0)
|
call test_override('term_props', 0)
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
" This checks the libvterm version response.
|
func Run_libvterm_konsole_response(code)
|
||||||
" 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)
|
|
||||||
|
|
||||||
set ttymouse=xterm
|
set ttymouse=xterm
|
||||||
call test_option_not_set('ttymouse')
|
call test_option_not_set('ttymouse')
|
||||||
let seq = "\<Esc>[>0;100;0c"
|
let seq = "\<Esc>[>0;" .. a:code .. ";0c"
|
||||||
call feedkeys(seq, 'Lx!')
|
call feedkeys(seq, 'Lx!')
|
||||||
call assert_equal(seq, v:termresponse)
|
call assert_equal(seq, v:termresponse)
|
||||||
call assert_equal('sgr', &ttymouse)
|
call assert_equal('sgr', &ttymouse)
|
||||||
@@ -1685,6 +1678,20 @@ func Test_xx03_libvterm_response()
|
|||||||
\ underline_rgb: 'u',
|
\ underline_rgb: 'u',
|
||||||
\ mouse: 's'
|
\ mouse: 's'
|
||||||
\ }, terminalprops())
|
\ }, 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=
|
set t_RV=
|
||||||
call test_override('term_props', 0)
|
call test_override('term_props', 0)
|
||||||
|
@@ -723,6 +723,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 */
|
||||||
|
/**/
|
||||||
|
273,
|
||||||
/**/
|
/**/
|
||||||
272,
|
272,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user