summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-07-30 21:18:03 +0200
committerBram Moolenaar <Bram@vim.org>2021-07-30 21:18:03 +0200
commit0f5575d0a7316a9c9a4b02df3372a07514cd8f26 (patch)
treeb3f9693ad3cb4a28b551e2097ae3e14ebd3119f5
parent1790be6cb6f2edfd8a833dd848b8df02cef599cf (diff)
downloadvim-git-0f5575d0a7316a9c9a4b02df3372a07514cd8f26.tar.gz
patch 8.2.3251: listing builtin_gui as an available terminal is confusingv8.2.3251
Problem: Listing builtin_gui as an available terminal is confusing. Solution: Do not list builtin_gui. (Christian Brabandt, closes #8669, closes #8661)
-rw-r--r--src/term.c3
-rw-r--r--src/testdir/test_termcodes.vim12
-rw-r--r--src/version.c2
3 files changed, 16 insertions, 1 deletions
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
@@ -756,6 +756,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3251,
+/**/
3250,
/**/
3249,