bug-bash
[Top][All Lists]
Advanced

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

Re: RFE - support option for curses idea of term [tab]size.


From: Chet Ramey
Subject: Re: RFE - support option for curses idea of term [tab]size.
Date: Fri, 30 Apr 2021 09:22:54 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.0

On 4/29/21 10:39 PM, L A Walsh wrote:


On 2021/04/26 17:16, Chet Ramey wrote:
On 4/26/21 7:19 PM, L A Walsh wrote:
I'm not clear if termcap lib has this or not, when the curses
library is in use, it supports the idea of reading and setting
the term [tab]size.

Can't you do this with `stty size' already?
Setting size: sometimes, depends on the Terminal, but having readline
know about where tabs expand to is only handled through libcurses and
not device driver, which I believe is where stty asserts its effects.

OK, so we are talking about tab stops here, not the terminal size as
you originally wrote.

Readline doesn't know or care where tabs expand.


Readline is tab-agnostic, or tab-stop-agnostic, in a sense. It performs tab
expansion itself during redisplay, and currently uses a tab stop of 8.
That's not user-settable.
---
   It doesn't always do it correctly because it doesn't always know
where it is in a line.  As such it has a bug that would be fixed by
having it really know where it was at (from talking with libcurses)
as well as what the tabstops were really set to.

If you want to report a bug, you're going to have to be more specific.


   I.e. it would be more user-friendly if readline considered the knowledge
of the terminal[-emulator] that it is running under when possible.  Taking
pride in doing the wrong thing that doesn't match the terminals settings
shouldn't really be considered a plus or a design goal.

Ah, so what you would like is a user-settable value for tab stops. What
value do you think this would provide to the user community?


That readline can't be used with a variable font or tabsize seems like
a limitation associated with only relating to computers through a fixed-size
window w/fixed-sized characters & fixed tabstops.

Readline doesn't know the character widths of variable-width fonts, and
there is no portable way to discover it. How would you solve this problem?
(And if you think curses is the way to solve it, look for another
solution.)


--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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