Re: Word wrap bug. (fwd)




On Tue, 11 Jan 2000, Jason A . Smith wrote:
> 	I think I found a minor bug in the word wrapping code in balsa.  If 
> a line contains one really long word, like a long URL for example, then 
> it is cut at the correct place, but a character is missing at the place 
> that the line is cut.  I assume that this is done to cut out the space 
> that is usually between words.  Sorry I don't have the time to go through 
> the code and fix it myself to send you a patch.

I have to commit another change -- which unfortunately I keep having to
put off due to other projects -- but I'll look at this and fix it in the
next couple of days.

> 	I also have a question about the line wrapping preference dialog and 
> what the code actually does.  I see in the code, that if the line begins 
> with a ">" it is broken at what the user specifies, otherwise it is cut 6 
> spaces before.  I can understand the reason why this is done, but still 
> as a user I would find it odd that when I specify word wrapping at 78 
> characters, the program really wraps it at 72 characters.  Shouldn't it 
> wrap it at the place that the user requests?

I understand what you mean, but the choice seems to be either to have a
somewhat intelligent wrapping function to prevent 'quoted' text from
wrapping strangely in a reply and living w/ the non-intuitive nature of
the preference dialog, OR having a simple wrap that leaves messages in any
exchange back and forth looking confusing.  (I suppose we could offer the
user the chance to pick 'normal' and 'quoted' breaking characters, but
this seems to be overkill.)  In other words, if you default to 72 you only
defer the problem -- someone will inevitably complain that's it's
confusing that quoted text breaks at 78 and 'not 72'... :)

> specifies.  Also, if you are going to check for a line beginning with ">" 
> in the code, it should probably be changed to whatever the user specified 
> the reply prefix to instead of hard coding a ">", just in case they 
> changed it.
> 
> -Jason
>

This makes sense to me, but then we enter some weird territory -- first,
this is most often breaking lines from someone /else's/ program so we have
to make reasonable guesses about what other programs use, and, second,
someone can enter, for instance "You Said>" in prefix, in which case all
lines that start w/ 'Y' are wrapped differently.  Checking for the full
string at the begging is pretty easy in perl, but a pain in C -- of
course, this may be the 'best' option in the long run.

David




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]