bug-ncurses
[Top][All Lists]
Advanced

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

Re: Tabstop width not reset by reset command, or hardcoded to wrong widt


From: Thomas Dickey
Subject: Re: Tabstop width not reset by reset command, or hardcoded to wrong width
Date: Mon, 27 May 2019 15:19:33 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Sun, May 26, 2019 at 11:13:21PM +0200, Vincent Huisman wrote:
> On 26-05-2019 16:39, Thomas Dickey wrote:
> >Offhand, using hard-resets in rs1/rs2 would reinforce that assumption,
> >and eliminate the overhead of constructing tab-stops to make "it" match
> >the user's expectations.  You see, the documentation says that "it" matches
> >the power-up behavior.  It doesn't tell ncurses to initialize it to that
> >value.
> 
> This is in reset_cmd, I assumed that that's not called on whatever
> initialisation, but only on actual calls to the reset utility? I have little

no - the tput manpage (attempts to) make it clear that

        tput init
        tput reset

differ only by whether they use is1/is2/is3 versus rs1/rs2/rs3.

Likewise, tset and the "reset" alias use the same code.

You might find this helpful:

https://invisible-island.net/ncurses/announce.html#h3-programs

In ncurses 6.1, tput and tset use the same code, do the same things
(except for a historical difference of stderr versus stdout for
writing the escape sequences).  Their command-line options differ.

tput's manpage has always gone into more detail about the steps
it performs, but tset does the same thing (and rewriting its manpage
to look more like tput's wasn't really necessary).

> Regarding reset_tabstops in tset, the value of init_tabs on its own says
> nothing about the terminal capabilities as far as I can tell, so if you're
> trying to avoid running code on terminals that have specific features then
> you should check for those specific features rather than this unrelated
> variable.

sure - but it's not necessary to change the _program_, but only the
terminal database (if we encounter an actual terminal which needs the
change...).

By the way, discussing a specific terminal description and a specific
terminal (emulator or not) would be more constructive.

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

Attachment: signature.asc
Description: Digital signature


reply via email to

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