mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -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:
966
src/term.c
966
src/term.c
File diff suppressed because it is too large
Load Diff
@@ -2026,13 +2026,27 @@ endfunc
|
||||
|
||||
func Test_list_builtin_terminals()
|
||||
CheckRunVimInTerminal
|
||||
|
||||
call RunVimInTerminal('', #{rows: 14})
|
||||
call term_sendkeys('', ":set cmdheight=3\<CR>")
|
||||
call TermWait('', 100)
|
||||
call term_sendkeys('', ":set term=xxx\<CR>")
|
||||
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('')
|
||||
endfunc
|
||||
|
||||
|
@@ -695,6 +695,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
899,
|
||||
/**/
|
||||
898,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user