1
0
forked from aniani/vim

patch 8.2.3251: listing builtin_gui as an available terminal is confusing

Problem:    Listing builtin_gui as an available terminal is confusing.
Solution:   Do not list builtin_gui. (Christian Brabandt, closes #8669,
            closes #8661)
This commit is contained in:
Bram Moolenaar
2021-07-30 21:18:03 +02:00
parent 1790be6cb6
commit 0f5575d0a7
3 changed files with 16 additions and 1 deletions

View File

@@ -1786,7 +1786,8 @@ report_term_error(char *error_msg, char_u *term)
mch_errmsg("\r\n");
for (termp = &(builtin_termcaps[0]); termp->bt_string != NULL; ++termp)
{
if (termp->bt_entry == (int)KS_NAME)
if (termp->bt_entry == (int)KS_NAME
&& STRCMP(termp->bt_string, "gui") != 0)
{
#ifdef HAVE_TGETENT
mch_errmsg(" builtin_");

View File

@@ -2348,4 +2348,16 @@ func Test_special_term_keycodes()
bw!
endfunc
func Test_terminal_builtin_without_gui()
CheckNotMSWindows
" builtin_gui should not be output by :set term=xxx
let output = systemlist("TERM=dumb " .. v:progpath .. " --clean -c ':set t_ti= t_te=' -c 'set term=xxx' -c ':q!'")
redraw!
call map(output, {_, val -> trim(val)})
call assert_equal(-1, index(output, 'builtin_gui'))
call assert_notequal(-1, index(output, 'builtin_dumb'))
endfunc
" vim: shiftwidth=2 sts=2 expandtab

View File

@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
3251,
/**/
3250,
/**/