Problem: Listing builtin_gui as an available terminal is confusing.
Solution: Do not list builtin_gui. (Christian Brabandt, closes #8669,
closes #8661)
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_");
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
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3251,
/**/
3250,
/**/