bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: terminfo entry for wezterm doesn't match upstream


From: Thomas Dickey
Subject: Re: terminfo entry for wezterm doesn't match upstream
Date: Wed, 24 Jul 2024 15:19:49 -0400

On Wed, Jul 24, 2024 at 02:34:20AM -0600, Thayne McCombs wrote:
> While trying to debug an issue I ran into while using neovim
> (https://github.com/wez/wezterm/issues/5750#issuecomment-2244312811) where
> scrolling in one window would partially scrol an adjacent window, I
> discovered that the version of the terminfo entry for wezterm included in
> the ncurses package (which I use on archlinux) doesn't match the one
> included in the repo for wezterm itself. And I believe that this is causing
> bugs in using the terminal with TERM=wezterm.
> 
> If I follow the directions for
> https://wezfurlong.org/wezterm/config/lua/config/term.html to install the
> terminfo from the source at 
> https://raw.githubusercontent.com/wez/wezterm/main/termwiz/data/wezterm.terminfo
> then the aforementioned bug with scrolling no longer happens.
> 
> If I run infocmp to compare the two terminfo entries, I get the following
> diff:
> 
> $ infocmp -d -A /usr/share/terminfo -B ~/.terminfo wezterm
> comparing wezterm to wezterm.
>     comparing booleans.
>         hs: F:T.
>         km: F:T.
>         xenl: F:T.
>     comparing numbers.
>         pairs: 65536, 32767.
>     comparing strings.
>         cvvis: NULL, '\E[?12;25h'.
>         dsl: NULL, '\E]2;\E\\'.
>         fsl: NULL, '\E\\'.
>         ka1: '\EOw', NULL.
>         ka3: '\EOy', NULL.
>         kb2: '\EOu', '\EOE'.
>         kbeg: '\EOE', NULL.
>         kc1: '\EOq', NULL.
>         kc3: '\EOs', NULL.
>         mgc: '\E[?69l', NULL.
>         nel: '\EE', NULL.
>         rmkx: '\E[?1l', '\E[?1l\E>'.
>         rmm: NULL, '\E[?1034l'.
>         smglp: '\E[?69h\E[%i%p1%ds', NULL.
>         smglr: '\E[?69h\E[%i%p1%d;%p2%ds', NULL.
>         smgrp: '\E[?69h\E[%i;%p1%ds', NULL.
>         smkx: '\E[?1h', '\E[?1h\E='.
>         smm: NULL, '\E[?1034h'.
>         tsl: NULL, '\E]0;'..
> 
> Is there a reason for this difference? Could the ncurses version at least be
> updated to avoid causing the aforementioned bug in nvim?

It's probably wezterm's buggy implementation of left/right margins.

I have some notes here:

https://invisible-island.net/ncurses/terminfo.src.html#toc-_Wez_Term

I can review that and drop the broken feature(s) from ncurses' database.

(checking the source code, I see that Wes's FAQ recommends TERM=xterm-256color,
which will have the same problem unless one installs his hacked-up copy of
ncurses's terminal description)

-- 
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]