bug-ncurses
[Top][All Lists]
Advanced

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

Using alt 1049 in nsterm (Terminal.app) 445?


From: Paul Handly
Subject: Using alt 1049 in nsterm (Terminal.app) 445?
Date: Mon, 22 Aug 2022 21:50:57 -0700
User-agent: Cyrus-JMAP/3.7.0-alpha0-841-g7899e99a45-fm-20220811.002-g7899e99a

After a few months of "background color leakage" when exiting vim, I attempted 
to find the source of the problem. I found an effective fix (or workaround), 
but I would like some help determining whether this is worthy of a terminfo 
update or arises from some quirk of my configuration.

Observed behavior:
 1. Using MacOS Terminal.app Build 445, open something in vim, observe 
gruvbox's "off black" background color working properly.
 2. :q, as one does. Observe background has been reset properly.
 3. Fire up "man man" to exercise the alternate background outside of vim
 4. Observe that lines with text are correctly colored, but blank lines have 
inherited the "off black" background color from vim's gruvbox theme.
 5. Exit man.
 6. Run "man man" again, colors are all as they should be, the goofy background 
state has been reset through unknown means.

This whole scenario appears to work properly (which is to say, vim colors don't 
leave vim) if I patch my nsterm description with the following:
> use=xterm+alt1049

I will also note that the equivalent rmcup and smcup sequences appear in the 
"xterm-256color" (and thus, default) description shipped with MacOS.

Can anyone advise me on how to use vttest or tack to ascertain whether 
"alt1049" is the right way to drive modern Terminal.app?

The following was used to reproduce the "leakage":
 * MacOS 12.5.1, Terminal.app Build 445
 * MacPorts vim, linked against macports ncurses
 * MacOS /usr/bin/man 1.6g
 * MacPorts nurses 6.3.0
 * TERM=nsterm-256color (terminfo included below)
 * vim colorscheme - https://github.com/morhetz/gruvbox

nsterm|nsterm-256color|Apple_Terminal|AppKit Terminal.app,
        am, bce, hs, mir, msgr, npc, xenl, xon,
        colors#0x100, cols#80, it#8, lines#24, pairs#0, wsl#50,
        acsc=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
        bel=^G, blink=\E[5m, bold=\E[1m, civis=\E[?25l,
        clear=\E[H\E[J, cnorm=\E[?25h, cr=\r,
        csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
        cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
        cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
        dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m, dl=\E[%p1%dM,
        dl1=\E[M, dsl=\E]2;\007, ed=\E[J, el=\E[K, el1=\E[1K,
        enacs=\E(B\E)0, flash=\E[?5h$<200/>\E[?5l, fsl=^G,
        home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
        ich1=\E[@, il=\E[%p1%dL, il1=\E[L, ind=\n, invis=\E[8m,
        kDC=\E[3;2~, kLFT=\E[1;2D, kRIT=\E[1;2C, ka1=\EOq,
        ka3=\EOs, kb2=\EOr, kbs=^?, kc1=\EOp, kc3=\EOn, kcbt=\E[Z,
        kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
        kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP, kf10=\E[21~,
        kf11=\E[23~, kf12=\E[24~, kf13=\E[25~, kf14=\E[26~,
        kf15=\E[28~, kf16=\E[29~, kf17=\E[31~, kf18=\E[32~,
        kf19=\E[33~, kf2=\EOQ, kf20=\E[34~, kf3=\EOR, kf4=\EOS,
        kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, kf8=\E[19~, kf9=\E[20~,
        khome=\EOH, kmous=\E[<, knp=\E[6~, kpp=\E[5~, op=\E[39;49m,
        rc=\E8, rev=\E[7m, ri=\EM, ritm=\E[23m, rmacs=^O,
        rmam=\E[?7l, rmcup=\E[2J\E[?47l\E8, rmir=\E[4l,
        rmkx=\E[?1l\E>, rmso=\E[27m, rmul=\E[24m,
        rs2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h, sc=\E7,
        setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
        setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
        
sgr=\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p7%t;8%;m%?%p9%t\016%e\017%;,
        sgr0=\E[m\017, sitm=\E[3m, smacs=^N, smam=\E[?7h,
        smcup=\E7\E[?47h, smir=\E[4h, smkx=\E[?1h\E=, smso=\E[7m,
        smul=\E[4m, tbc=\E[3g, tsl=\E]2;, u6=\E[%i%d;%dR, u7=\E[6n,
        u8=\E[?1;2c, u9=\E[c, vpa=\E[%i%p1%dd,

-- 
Paul Handly <paul@hand.ly>



reply via email to

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