Re: rox-edit: Fix for 'x lines selected' message

Thomas Leonard <[email protected]> Sat, 2 May 2009 12:36:49 +0100
Newsgroups gmane.comp.desktop.rox.devel
Message-ID <[email protected]>
2009/5/1 Bernard Jungen <[email protected]>:
> On Fri, May 01, 2009 at 07:50:41PM +0100, Thomas Leonard wrote:
>> 2009/4/27 Bernard Jungen <[email protected]>:
>> > At http://repo.or.cz/w/rox-edit/bju.git?a=commit;h=202e2b1945b81818685925db4ac1e8943a4b6a42
>>
>> "Number of lines was one too much in some special cases
>> Added separate message for the one-line case + French translation"
>>
>> How can it say one line is selected? If the selection starts and ends
>> on the same line then it displays the number of characters instead.
>> What are the special cases where it gets it wrong?
>
> The code says it all. What happens if the newline is selected too? Same number
> of characters selected? No. Two lines selected (as was printed)? No.
>
> The bug is obvious when you're used to select entire lines.

Before, if you selected just the newline character, it would say "2
lines selected". Now it says "One line selected". Neither is correct,
I think.

Perhaps we should display complete lines and extra characters, e.g.
"One character selected" in that case, or "35 lines plus 5 characters
selected", etc?


-- 
Dr Thomas Leonard		ROX desktop / Zero Install
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf