Patch 9.0.0957
Problem:    Tests fail without the terminal feature.
Solution:   Move functions to another utility script.
Files:      src/testdir/term_util.vim, src/testdir/view_util.vim


*** ../vim-9.0.0956/src/testdir/term_util.vim   2022-11-27 12:45:37.311707363 
+0000
--- src/testdir/term_util.vim   2022-11-27 13:47:38.521028984 +0000
***************
*** 189,231 ****
    return join(map(a:lines, 'term_getline(a:buf, v:val)'), '')
  endfunc
  
- " When using RunVimInTerminal() we expect modifyOtherKeys level 2 to be 
enabled
- " automatically.  The key + modifier Escape codes must then use the
- " modifyOtherKeys encoding.  They are recognized anyway, thus it's safer to 
use
- " than the raw code.
- 
- " Return the modifyOtherKeys level 2 encoding for "key" with "modifier"
- " (number value, e.g. CTRL is 5).
- func GetEscCodeCSI27(key, modifier)
-   let key = printf("%d", char2nr(a:key))
-   let mod = printf("%d", a:modifier)
-   return "\<Esc>[27;" .. mod .. ';' .. key .. '~'
- endfunc
- 
- " Return the modifyOtherKeys level 2 encoding for "key" with "modifier"
- " (character value, e.g. CTRL is "C").
- func GetEscCodeWithModifier(modifier, key)
-   let modifier = get({'C': 5}, a:modifier, '')
-   if modifier == ''
-     echoerr 'Unknown modifier: ' .. a:modifier
-   endif
-   return GetEscCodeCSI27(a:key, modifier)
- endfunc
- 
- " Return the kitty keyboard protocol encoding for "key" with "modifier"
- " (number value, e.g. CTRL is 5).
- func GetEscCodeCSIu(key, modifier)
-   let key = printf("%d", char2nr(a:key))
-   let mod = printf("%d", a:modifier)
-   return "\<Esc>[" .. key .. ';' .. mod .. 'u'
- endfunc
- 
- " Return the kitty keyboard protocol encoding for "key" without a modifier.
- " Used for the Escape key.
- func GetEscCodeCSIuWithoutModifier(key)
-   let key = printf("%d", char2nr(a:key))
-   return "\<Esc>[" .. key .. 'u'
- endfunc
- 
  
  " vim: shiftwidth=2 sts=2 expandtab
--- 189,193 ----
*** ../vim-9.0.0956/src/testdir/view_util.vim   2022-10-06 19:49:09.561466199 
+0100
--- src/testdir/view_util.vim   2022-11-27 13:47:45.185026499 +0000
***************
*** 62,64 ****
--- 62,104 ----
    bw!
    redraw!
  endfunc
+ 
+ 
+ " When using RunVimInTerminal() we expect modifyOtherKeys level 2 to be 
enabled
+ " automatically.  The key + modifier Escape codes must then use the
+ " modifyOtherKeys encoding.  They are recognized anyway, thus it's safer to 
use
+ " than the raw code.
+ 
+ " Return the modifyOtherKeys level 2 encoding for "key" with "modifier"
+ " (number value, e.g. CTRL is 5).
+ func GetEscCodeCSI27(key, modifier)
+   let key = printf("%d", char2nr(a:key))
+   let mod = printf("%d", a:modifier)
+   return "\<Esc>[27;" .. mod .. ';' .. key .. '~'
+ endfunc
+ 
+ " Return the modifyOtherKeys level 2 encoding for "key" with "modifier"
+ " (character value, e.g. CTRL is "C").
+ func GetEscCodeWithModifier(modifier, key)
+   let modifier = get({'C': 5}, a:modifier, '')
+   if modifier == ''
+     echoerr 'Unknown modifier: ' .. a:modifier
+   endif
+   return GetEscCodeCSI27(a:key, modifier)
+ endfunc
+ 
+ " Return the kitty keyboard protocol encoding for "key" with "modifier"
+ " (number value, e.g. CTRL is 5).
+ func GetEscCodeCSIu(key, modifier)
+   let key = printf("%d", char2nr(a:key))
+   let mod = printf("%d", a:modifier)
+   return "\<Esc>[" .. key .. ';' .. mod .. 'u'
+ endfunc
+ 
+ " Return the kitty keyboard protocol encoding for "key" without a modifier.
+ " Used for the Escape key.
+ func GetEscCodeCSIuWithoutModifier(key)
+   let key = printf("%d", char2nr(a:key))
+   return "\<Esc>[" .. key .. 'u'
+ endfunc
+ 
*** ../vim-9.0.0956/src/version.c       2022-11-27 12:45:37.311707363 +0000
--- src/version.c       2022-11-27 13:50:35.194101896 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     957,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
157. You fum through a magazine, you first check to see if it has a web
     address.

 /// 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/20221127135145.CF75A1C09D0%40moolenaar.net.

Raspunde prin e-mail lui