Re: Article line wrapping bug fix

Urs Janßen <[email protected]>
Newsgroups gmane.network.tin.devel
Message-ID <[email protected]>
On Sat, Oct 08, 2005 at 09:56:26AM +0200, [email protected] wrote:
> Hi,
> 
> When tinrc.wrap_column has been set to a value > 0 tin will happily wrap
> lines at a column position wider than the current screen size. (I noticed
> this behaviour using an old tinrc with wrap_column set to 128 while running
> tin in an xterm 100 columns wide). Might I suggest the following patch to
> fix this?
> 
> Arjan
> 
> 
> --- cook.c.old	2005-10-08 09:32:38.000000000 +0200
> +++ cook.c	2005-10-08 09:33:56.000000000 +0200
> @@ -170,7 +170,7 @@
>  	if (tinrc.wrap_column < 0)
>  		wrap_column = ((tinrc.wrap_column > -cCOLS) ? cCOLS + tinrc.wrap_column : cCOLS);
>  	else
> -		wrap_column = ((tinrc.wrap_column > 0) ? tinrc.wrap_column : cCOLS);
> +		wrap_column = (((tinrc.wrap_column > 0) && (tinrc.wrap_column < cCOLS)) ? tinrc.wrap_column : cCOLS);
>  
>  	p = bufp = buf;

but now tinrc.wrap_column > cCOLS would behave like tinrc.wrap_column = 0
(so users who dislike the feature of cutting off long lines could just use
tinrc.wrap_column = 0). 

urs
-- 
"Only whimps use tape backup: _real_ men just upload their important stuff
 on ftp, and let the rest of the world mirror it ;)" - Linus
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.