diff --git a/src/term.c b/src/term.c index cec16b608..a13959b1c 100644 --- a/src/term.c +++ b/src/term.c @@ -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_"); diff --git a/src/testdir/test_termcodes.vim b/src/testdir/test_termcodes.vim index 2f2fe3b57..f73770b3d 100644 --- a/src/testdir/test_termcodes.vim +++ b/src/testdir/test_termcodes.vim @@ -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 diff --git a/src/version.c b/src/version.c index f324f3d97..046d1e744 100644 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 3251, /**/ 3250, /**/