[tin-dev] full screen width in raw-mode?

Thomas Dickey dickey at his.com
Wed Aug 9 22:56:17 CEST 2023


On Wed, Aug 09, 2023 at 07:03:10PM +0200, Urs Janßen wrote:
> cook.c:put_cooked() wraps at cCOLS (if tinrc.wrap_column is 0)
> page.c:toggle_raw() wraps at cCOLS-1 (in raw-mode)
> 
> so toggling view with ^H on articles with long (header)-lines (i.e
> tinrc.news_headers_to_display=Path ...) gives different results ...
> 
> I wonder why we have -1 here (for years) and if the following would have
> any unwanted side effects?

it does - the "-1" is to work around differences in terminal wrapping.

DEC vt100 and compatible terminals will leave the cursor on the right
margin when writing a printable character (counting space), and ignore
newline, tab, written at that point.  Another printable character will
make it wrap.

Some other terminals don't do that.

In terminfo(5), that's

          eat_newline_glitch          xenl      xn     newline ignored af‐
                                                       ter 80 cols (con‐
                                                       cept)
 
(I recall explaining this a while back, but it's probably quite a while)

> === modified file 'src/page.c'
> --- old/src/page.c	2023-06-27 01:46:29 +0000
> +++ new/src/page.c	2023-08-09 16:36:44 +0000
> @@ -2058,7 +2058,7 @@
>  
>  				p = line;
>  				while (*p) {
> -					space = cCOLS - 1;
> +					space = cCOLS;
>  
>  					while ((space > 0) && *p) {
>  #if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
> 
> _______________________________________________
> tin-dev mailing list
> tin-dev at tin.org
> http://lists.tin.org/cgi-bin/mailman/listinfo/tin-dev

-- 
Thomas E. Dickey <dickey at invisible-island.net>
https://invisible-island.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <http://lists.tin.org/pipermail/tin-dev/attachments/20230809/68333e04/attachment.sig>


More information about the tin-dev mailing list