[PATCH] Group level title too long for narrow terminal
Hi, If the group name is very long and the terminal window is relatively narrow, the title in the group level is not shortened appropriately (independent of tinrc.abbreviate_groupname). I noticed this with gmane.linux.debian.alioth.pkg-gnupg.general on news.gmane.io (tin -g news.gmane.io gmane.linux.debian.alioth.pkg-gnupg.general). The attached patch should fix this. Interestingly, the maximum possible room for the title cannot be used, since txt_you_have_mail and txt_type_h_for_help are defined with leading spaces: txt_you_have_mail: " You have mail" txt_type_h_for_help: " h=help" Is there any reason for those leading spaces? Dennis
On Wed, Feb 09, 2022 at 08:38:57PM +0100, Dennis Preiser wrote:
Hi,
If the group name is very long and the terminal window is relatively narrow, the title in the group level is not shortened appropriately (independent of tinrc.abbreviate_groupname). I noticed this with gmane.linux.debian.alioth.pkg-gnupg.general on news.gmane.io (tin -g news.gmane.io gmane.linux.debian.alioth.pkg-gnupg.general).
The attached patch should fix this.
Interestingly, the maximum possible room for the title cannot be used, since txt_you_have_mail and txt_type_h_for_help are defined with leading spaces:
txt_you_have_mail: " You have mail" txt_type_h_for_help: " h=help"
Is there any reason for those leading spaces?
It's done for formatting (not my work - I'd have done this with a few lines of code - which your patch appears to do). fwiw, it's in the oldest copy I have of screen.c, from August 1995. -- Thomas E. Dickey <dickey@invisible-island.net> https://invisible-island.net ftp://ftp.invisible-island.net
On Wed, Feb 09, 2022 at 05:54:44PM -0500, Thomas Dickey wrote:
It's done for formatting (not my work - I'd have done this with a few
right, and likely (but that's just a guess) to have space for longer translated strings (IIRC the idea of putting all the strings in lang.c was that ppl. could replace them there with translations - remeber this was 1991 (see below)).
lines of code - which your patch appears to do).
fwiw, it's in the oldest copy I have of screen.c, from August 1995.
it dates back to tin-1.0 (tass didn't have those spaces).
participants (3)
-
Dennis Preiser -
Thomas Dickey -
Urs Janßen