[Top][All Lists]

[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: Thu, 23 May 2019 20:36:48 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, May 23, 2019 at 08:16:03AM +0545, Vincent Huisman wrote:
> 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

yes - now that I looked more carefully.  I added a to-do item to fix it.

A recent/earlier discussion here


dwelt upon the differences between the "tabs" command-line utility
versus the library, and this appeared to be a followup.  (At the
time, I added notes on how I might make that gap easier to bridge
with a few new functions).
> 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

actually the fputs has to be altered as well, e.g., first check that init_tabs
is nonzero, and then eliminate the fixed-length string:

        printf("%*s", init_tabs, " ");

> init_tabs spaces every iteration. That way, every terminal is properly
> cleaned and back to its defaults.
> Sincerely,
> Vincent Huisman

Thomas E. Dickey <address@hidden>

Attachment: signature.asc
Description: Digital signature

reply via email to

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