Patch 9.0.0273
Problem:    Konsole termresponse not recognized.
Solution:   Handle Konsole like libvterm, set 'ttymouse' to "sgr".
            (closes #10990)
Files:      src/term.c, src/testdir/test_termcodes.vim


*** ../vim-9.0.0272/src/term.c  2022-08-14 14:16:08.003582142 +0100
--- src/term.c  2022-08-26 12:19:55.162326852 +0100
***************
*** 4715,4721 ****
        }
  
        // libvterm sends 0;100;0
!       if (version == 100 && arg[0] == 0 && arg[2] == 0)
        {
            // If run from Vim $COLORS is set to the number of
            // colors the terminal supports.  Otherwise assume
--- 4715,4722 ----
        }
  
        // libvterm sends 0;100;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
*** ../vim-9.0.0272/src/testdir/test_termcodes.vim      2022-07-23 
06:24:56.405106035 +0100
--- src/testdir/test_termcodes.vim      2022-08-26 12:25:07.219498191 +0100
***************
*** 1664,1680 ****
    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)
! 
    set ttymouse=xterm
    call test_option_not_set('ttymouse')
!   let seq = "\<Esc>[>0;100;0c"
    call feedkeys(seq, 'Lx!')
    call assert_equal(seq, v:termresponse)
    call assert_equal('sgr', &ttymouse)
--- 1664,1673 ----
    call test_override('term_props', 0)
  endfunc
  
! func Run_libvterm_konsole_response(code)
    set ttymouse=xterm
    call test_option_not_set('ttymouse')
!   let seq = "\<Esc>[>0;" .. a:code .. ";0c"
    call feedkeys(seq, 'Lx!')
    call assert_equal(seq, v:termresponse)
    call assert_equal('sgr', &ttymouse)
***************
*** 1685,1690 ****
--- 1678,1697 ----
          \ 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)
*** ../vim-9.0.0272/src/version.c       2022-08-26 11:54:58.385177821 +0100
--- src/version.c       2022-08-26 12:20:36.850261099 +0100
***************
*** 725,726 ****
--- 725,728 ----
  {   /* Add new patch number below this line */
+ /**/
+     273,
  /**/

-- 
Kisses may last for as much as, but no more than, five minutes.
                [real standing law in Iowa, United States of America]

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20220826112645.1944D1C0DDF%40moolenaar.net.

Raspunde prin e-mail lui