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: Vincent Huisman
Subject: Re: Tabstop width not reset by reset command, or hardcoded to wrong width
Date: Thu, 23 May 2019 08:16:03 +0545
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

On 23-05-2019 07:01, Thomas Dickey wrote:
On Wed, May 22, 2019 at 03:16:52PM +0545, Vincent Huisman wrote:
I came across a bug report about tabs
http://lists.gnu.org/archive/html/bug-ncurses/2019-02/msg00021.html
...
Anyway, so I now have a custom terminal by changing init_tabs#4 in the
existing terminal description, and saved it in ~/.terminfo. On every ssh to
that box I set tabs 4 from .bashrc. Everything is working fine until I issue
reset on that terminal. The tab width is reset back to 8, regardless of

That's standard.  You can customize it, according to your preference.

Okay, how about the rest of my e-mail? Is this not a bug on terminals which have init_tabs#4? Okay, there are none that support ct/st in my /usr/share/terminfo, but assuming there is one? Is there a specific reason to hardcode it to 8 even though this terminal uses something else by default, thus having "reset" change its behaviour on a "clean" terminal?

Is this not a bug on any terminal with init_tabs#8 when accidentally cat'ing a binary file containing a sequence to change the tabstop width? Because in that case the tabstop width is *not* restored to 8 when issuing a reset. Isn't ncurses at least supposed to behave consistently in both cases?

I must say my knowledge of terminals and ncurses isn't great, so maybe I'm missing something, but it doesn't look like logical behaviour to me. I'd have reset always change ALL the parameters on a terminal back to their defaults as per terminfo. So that would mean that (for me) the desired outcome of the test cases in my previous mail would be:

Default terminal (linux):
$ reset; cat abc
abc
        abc

Default terminal (linux) modified with it#4:
$ reset; cat abc
abc
    abc

Which currently is the opposite of the actual outcome. So, in reset_tabstops, I'd get rid of the check on init_tabs (keep the check for st and ct), modify the loop to use init_tabs instead of 8 and only output init_tabs spaces every iteration. That way, every terminal is properly cleaned and back to its defaults.

Sincerely,

Vincent Huisman



reply via email to

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