[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFE - support option for curses idea of term [tab]size.
From: |
L A Walsh |
Subject: |
Re: RFE - support option for curses idea of term [tab]size. |
Date: |
Thu, 29 Apr 2021 19:39:37 -0700 |
User-agent: |
Thunderbird 2.0.0.24 (Windows/20100228) |
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.
Users can set this with the 'tabs' program included in the
curses package.
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.
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.
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.
[It] Probably isn't going to disappear overnight, but I'm not sure
relating to
a computer in fixed-sized display units is likely to remain a fixed-property
of human<->computer interactions...