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: Koichi Murase
Subject: Re: RFE - support option for curses idea of term [tab]size.
Date: Fri, 30 Apr 2021 20:45:30 +0900

2021年4月30日(金) 11:41 L A Walsh <bash@tlinx.org>:
> On 2021/04/26 17:16, Chet Ramey wrote:
> > 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.

I think Readline always knows the current cursor position in terminals
of any tabstops because it just never sends TABs to terminals. "It
performs tab expansion itself" means that Readline internally converts
TABs to an appropriate number of spaces using virtual tabstops of 8.
In fact, I rearranged tabstops to 4n by the following command (in
Mintty which supports CTC [CSI W] and HTS [ESC H]), but Readline
continues to align characters with tabstops of 8n and there are no
glitches.

$ printf '\r\e[5W'; for a in {4..80..4}; do printf  '\e[4C\eH'; done

Maybe it is more friendly to reflect the current terminal settings of
tabstops, but I wouldn't call it a bug that Readline doesn't emulate
it.

> 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.

I don't think curses/ncurses or any other terminal applications
support the cursor movements taking account of variable character
sizes of proportional fonts. Currently, there is no terminal protocol
to retrieve/control the variable width of each character in the
proportional fonts. It's not the specific problem of Readilne.



reply via email to

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