[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: New terminfo: xterm-ghostty
From: |
Thomas Dickey |
Subject: |
Re: New terminfo: xterm-ghostty |
Date: |
Sat, 28 Dec 2024 06:55:50 -0500 |
On Sat, Dec 28, 2024 at 01:43:53PM +0300, Aptivi CEO wrote:
> For Vim, upon further investigation and git blaming, ghostty originally
> used the "ghostty" terminfo name, before those commits changed it to
> "xterm-ghostty" to try to "fix" key protocols:
>
> ----------------------------
>
> https://github.com/ghostty-org/ghostty/commit/c540d1809515b0fe4e9322e4cfc67197ad13b803
>
> config: default TERM to xterm-ghostty
>
> Default the TERM value to "xterm-ghostty" to prevent breaking vim.
> Consider changing back to ghostty in the future
>
> https://github.com/ghostty-org/ghostty/commit/d0c673cdfc7ff23b621bf56922f5c50d4991f2b0
>
> terminfo: use 'xterm-ghostty' as primary name
>
> Use "xterm-ghostty" as the primary terminfo name. This is a hack on a
> hack...we use "xterm-ghostty" to prevent vim from breaking, and when we
> do this as the default we break tcell-based applications (lazygit, aerc,
> etc). tcell has a bug where the primary terminfo name must be the
> value of TERM. gdamore/tcell#639 fixes the issue
> but is not merged yet.
That's too bad (for tcell), but tcell happens to be a derived work of ncurses
(about 99% of the terminal data was mechanically translated, and some of the
source code was manually translated), while none of tcell's developers are
contributors here.
They also have an attitude problem which precludes my being much interested.
so that's off-topic.
> Fixes: 779186a ("config: add term config option")
>
> ----------------------------
>
> Both commits were made on September 28th, 2023. The mentioned tcell pull
> request https://github.com/gdamore/tcell/pull/639, made by one of ghostty's
> developers, was merged on December 4th, 2023. Also, the Vim comment
> mentioned pull request https://github.com/vim/vim/pull/13211 that was
> closed by commit
> https://github.com/vim/vim/commit/3695d0e41ba26db074dd5680564a6f87d522fb61
> on September 29th, 2023.
>
> As for vttest, I will also take a look at testing ghostty, but electricity
> problems and other factors prevent me from doing so.
I'll do that anyway. I don't add things to the terminal database which I'm
not able to test, because some developers are less careful in that regard.
> On Fri, Dec 27, 2024, 10:25 PM Thomas Dickey <dickey@his.com> wrote:
>
> > On Fri, Dec 27, 2024 at 01:00:34PM -0600, G. Branden Robinson wrote:
> > > At 2024-12-27T15:57:40+0300, Aptivi CEO wrote:
> > > > A new terminal emulator has just surfaced: ghostty. You can find its
> > > > website here: https://ghostty.org. I've managed to obtain the compiled
> > > > xterm-ghostty terminfo file here.
> > >
> > > Given that this project is independent of xterm, why would the database
> > > entry be named "xterm-ghostty" and not simply "ghostty"?
> >
> > The developers did that to fool vim into believing it's a variant of xterm:
> >
> > /// This will be used to set the `TERM` environment variable.
> > /// HACK: We set this with an `xterm` prefix because vim uses that
> > to enable key
> > /// protocols (specifically this will enable `modifyOtherKeys`),
> > among other
> > /// features. An option exists in vim to modify this: `:set
> > /// keyprotocol=ghostty:kitty`, however a bug in the
> > implementation prevents it
> > /// from working properly. https://github.com/vim/vim/pull/13211
> > fixes this.
> > term: []const u8 = "xterm-ghostty",
> >
> > however, that was addressed over a year ago, and it's unlikely that there
> > are
> > any users of vim who both care about the feature and will use ghostty.
> >
> > grep'ing through the source code shows me a lot of other things to dispute.
> >
> > (I took a quick try at vttest on arch, but ghostty hung - spits out a lot
> > of error messages - ymmv)
> >
> > --
> > Thomas E. Dickey <dickey@invisible-island.net>
> > https://invisible-island.net
> >
--
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
signature.asc
Description: PGP signature