bug-ncurses
[Top][All Lists]
Advanced

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

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


From: Thomas Dickey
Subject: Re: Using alt 1049 in nsterm (Terminal.app) 445?
Date: Sat, 27 Aug 2022 06:54:01 -0400
User-agent: Mutt/1.10.1 (2018-07-13)

On Wed, Aug 24, 2022 at 08:28:34PM -0400, Thomas Dickey wrote:
...
> But what you're saying is that there's some unwanted text on the
> alternate screen.
> 
> nsterm's using
> 
>       rmcup=\E[2J\E[?47l\E8,
>       smcup=\E7\E[?47h, 
> 
> i.e., on restoring _from_ the alternate screen, that would first be cleared.
> With 1049, xterm clears the alternate screen when switching _to_ it.
> 
> I did that to make it possible (with a menu entry) to inspect the alternate
> screen.  While most terminals don't provide _that_, I see that Terminal.app
> does have a menu entry (under "View").  fwiw, iTerm2 also does, but under
> Session/Terminal State (making it less accessible).

I'll investigate this aspect further (in a few other terminal emulators,
I'll still keep the 47 because they misbehave), but I might change nsterm.
 
> In a quick check, Terminal.app does clear the screen if I just use
> tput smcup/rmcup.  However, running vim doesn't switch to the
> alternate screen (checking a little further, vim's ignoring that
> part of the terminal description when it uses 47, but does use it with 1049).
> 
> I can see this by setting TERM and using "script" to capture the output
> from vim when starting/stopping it.
> 
> Some of vim's behavior is configurable, some is not.

fwiw, that's a bug in vim dating back (at least) to the inclusion of
libvterm in 2017:

https://github.com/vim/vim/tree/master/src/libvterm

e.g.,

https://github.com/unofficial-mirror/libvterm

Neither vim's modified libvterm or the original libvterm
handled 47 at any point in time.

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

Attachment: signature.asc
Description: PGP signature


reply via email to

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