0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

patch 9.0.0899: the builtin terminals are in one long list

Problem:    The builtin terminals are in one long list.
Solution:   Refactor into multiple lists and an index of the lists.
This commit is contained in:
Bram Moolenaar
2022-11-17 22:05:12 +00:00
parent 75ac25b496
commit 4654d63dec
3 changed files with 534 additions and 456 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -2026,13 +2026,27 @@ endfunc
func Test_list_builtin_terminals() func Test_list_builtin_terminals()
CheckRunVimInTerminal CheckRunVimInTerminal
call RunVimInTerminal('', #{rows: 14}) call RunVimInTerminal('', #{rows: 14})
call term_sendkeys('', ":set cmdheight=3\<CR>") call term_sendkeys('', ":set cmdheight=3\<CR>")
call TermWait('', 100) call TermWait('', 100)
call term_sendkeys('', ":set term=xxx\<CR>") call term_sendkeys('', ":set term=xxx\<CR>")
call TermWait('', 100) call TermWait('', 100)
call assert_match('builtin_dumb', term_getline('', 11))
call assert_match('Not found in termcap', term_getline('', 12)) " Check that the list ends in "builtin_dumb" and "builtin_debug".
let dumb_idx = 0
for n in range(8, 12)
if term_getline('', n) =~ 'builtin_dumb'
let dumb_idx = n
break
endif
endfor
call assert_notequal(0, dumb_idx, 'builtin_dumb not found')
call assert_match('builtin_dumb', term_getline('', dumb_idx))
call assert_match('builtin_debug', term_getline('', dumb_idx + 1))
call assert_match('Not found in termcap', term_getline('', dumb_idx + 2))
call StopVimInTerminal('') call StopVimInTerminal('')
endfunc endfunc

View File

@@ -695,6 +695,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 */
/**/
899,
/**/ /**/
898, 898,
/**/ /**/