nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] wrapping, etc.


From: David Benbennick
Subject: Re: [Nano-devel] wrapping, etc.
Date: Sun, 31 Mar 2002 21:01:02 -0500 (EST)

On Sun, 31 Mar 2002, David Lawrence Ramsey wrote:               <snip>
> I'm not in front of my box right now, but IIRC, the bug
> could be reproduced as follows using the following
> instructions (and, of course, your original wrapping
> patch).  It's easy to see if you turn on constant cursor
> position display before doing this.
> 
> 1. start with a blank buffer
> 2. type in "one two three"
> 3. move the cursor to the space between "one" and "two"
> 4. hold down the spacebar until "two three" has wrapped
> onto the next line


I guess it doesn't really matter, but I don't see an error here.  I do
        ./nano -c
in an 80-column xterm.  I type
        one two three
then move the cursor to column 4.  I type space until the cursor is in
column 63.  The file has 73 characters (that is, 72 plus the \n).  Then
one more space wraps the "three" and nano correctly says there are 74
characters.


If my original calculation of totsize is correct, then I vote to use it in
do_wrap().  Three reasons:
        1) nano is 160 bytes smaller that way.  Every little bit helps.
        2) it is slightly more efficient.
        3) Mainly, I think the totsize code is more readable that way,
since it explicitly says how totsize is changing and why.


But I don't mean to make a big deal about it.  If people don't agree with
me or don't care, fine.




reply via email to

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