[vim/vim] Using builtin term `builtin_gui` errors out. (#8661)

44 views
Skip to first unread message

Christian Brabandt

unread,
Jul 29, 2021, 3:21:58 PM7/29/21
to vim/vim, Subscribed

I was reading the help on the builtin terminals :h builtin-terms and noticed the following:

This is in the terminal:

~$ vim --clean -c ':set term=builtin_gui'
Error detected while processing command line:
E531: Use ":gui" to start the GUI: term=builtin_gui

Ok, apparently I have to enter it in the gui:

gvim --clean -c ':set term=builtin_gui`
E530: Cannot change term in GUI: term=builtin_gui

That seems to be contradictionary? Looking at the source:

https://github.com/vim/vim/blob/77111e2bfc7316eb6b1e653386cef6441af806f8/src/optionstr.c#L693-L702

and

https://github.com/vim/vim/blob/77111e2bfc7316eb6b1e653386cef6441af806f8/src/term.c#L2411-L2414

it seems to be really unlikely, that setting :set term=builtin_gui is ever going to work. So perhaps just remove that part then.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Bram Moolenaar

unread,
Jul 29, 2021, 4:26:36 PM7/29/21
to vim/vim, Subscribed


Christian wrote:

> I was reading the help on the builtin terminals [:h builtin-terms](https://vimhelp.org/term.txt.html#builtin-terms) and noticed the following:

>
> This is in the terminal:
>
> ```bash

> ~$ vim --clean -c ':set term=builtin_gui'
> Error detected while processing command line:
> E531: Use ":gui" to start the GUI: term=builtin_gui
> ```
>
> Ok, apparently I have to enter it in the gui:
> ```bash

> gvim --clean -c ':set term=builtin_gui`
> E530: Cannot change term in GUI: term=builtin_gui
> ```
>
> That seems to be contradictionary? Looking at the source:
>
> https://github.com/vim/vim/blob/77111e2bfc7316eb6b1e653386cef6441af806f8/src/optionstr.c#L693-L702
>
> and
>
> https://github.com/vim/vim/blob/77111e2bfc7316eb6b1e653386cef6441af806f8/src/term.c#L2411-L2414
>
> it seems to be really unlikely, that setting `:set term=builtin_gui`
> is ever going to work. So perhaps just remove that part then.

You are not supposed to set 'term' to "builtin_gui".
What part are you referring to that should be removed?


--
Bravely bold Sir Robin, rode forth from Camelot,
He was not afraid to die, Oh Brave Sir Robin,
He was not at all afraid to be killed in nasty ways
Brave, brave, brave, brave Sir Robin.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Christian Brabandt

unread,
Jul 29, 2021, 4:32:15 PM7/29/21
to vim/vim, Subscribed

Now that is interesting. The help :h builtin-terms mentions this part:

You can see a list of available builtin terminals with ":set term=xxx" (when
not running the GUI). Also see |+builtin_terms|.

So I did :set term=xxx and got a list of builtin terms:

:set term=xxx
E558: Terminal entry not found in terminfo
'xxx' not known. Available builtin terminals are:
    builtin_gui
    builtin_amiga
    builtin_ansi
    builtin_pcansi
    builtin_win32
    builtin_vt320
    builtin_vt52
    builtin_xterm
    builtin_iris-ansi
    builtin_debug
    builtin_dumb
E522: Not found in termcap: term=xxx

And a tried a couple of them and I wasn't able to use builtin_gui terminal.

So either the help should be updated and mention that builtin_gui should not be used (or even better it should not be shown at all after :set term=xxx) or it looks to me the builtin_gui terminal type can just be removed from the gui. But of course, if that is actually used by gvim internally, that can't be done.

Bram Moolenaar

unread,
Jul 29, 2021, 5:12:30 PM7/29/21
to vim/vim, Subscribed


Christian wrote:

> Now that is interesting. The help `:h builtin-terms` mentions this part:
>
> > You can see a list of available builtin terminals with ":set term=xxx" (when
> > not running the GUI). Also see |+builtin_terms|.
>
> So I did `:set term=xxx` and got a list of builtin terms:
> ```
> :set term=xxx
> E558: Terminal entry not found in terminfo
> 'xxx' not known. Available builtin terminals are:
> builtin_gui
> builtin_amiga
> builtin_ansi
> builtin_pcansi
> builtin_win32
> builtin_vt320
> builtin_vt52
> builtin_xterm
> builtin_iris-ansi
> builtin_debug
> builtin_dumb
> E522: Not found in termcap: term=xxx
> ```
>
> And a tried a couple of them and I wasn't able to use `builtin_gui` terminal.
>
> So either the help should be updated and mention that `builtin_gui`
> should not be used (or even better it should not be shown at all after
> `:set term=xxx`) or it looks to me the `builtin_gui` terminal type can

> just be removed from the gui. But of course, if that is actually used
> by gvim internally, that can't be done.

"builtin_gui" is used for 'term' when the GUI is running. Can't do
without it.

We can hide the name from the error, so that users don't think it can be
used. Now how do I write a test for that...

--
The software said it requires Windows 95 or better, so I installed Linux.


/// Bram Moolenaar -- ***@***.*** -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Bram Moolenaar

unread,
Jul 30, 2021, 3:18:48 PM7/30/21
to vim/vim, Subscribed

Closed #8661 via 0f5575d.

Reply all
Reply to author
Forward
0 new messages