nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] the wrapping of long insertions


From: Benno Schulenberg
Subject: Re: [Nano-devel] the wrapping of long insertions
Date: Sun, 15 Jun 2014 22:23:57 +0200

Hi Mark,

On Sun, Jun 15, 2014, at 18:38, Mark Majeres wrote:
> Sorry about combining issues into one patch, I've tried to be more
> aware of this, it slipped past me.

Okay, no problem.

> I don't see anything wrong with the example though.  When the line is
> cut, the line break is included in the cutbuffer.  After the paste the
> cursor has moved to the next line, this is the line that do_wrap() is
> applied to. If you do the same actions, but don't include the line
> break in the cut, it looks ok.

Okay.  I understand.  But I still think it is not what the user
would want or expects.

> I could move the cursor back to the location where the paste was
> issued and then call do_wrap, I suppose,

Yes, that would be the right thing to do, in my opinion.  Pasting
a piece of text should behave exactly as if this text had been typed
in by the user (or by a fantastically fast copying smurf).

> but this will also have side
> effects.  What should happen if the cutbuffer has multiple lines?

If the cutbuffer contains multiple lines, then do_wrap() should
iterate though all of them, and at the end put the cursor back at
the end of the insertion.

> These are some of the issues related to my question about wrapping the
> entire sentence or paragraph.  Currently the routine will combine the
> current and next line only, then break it up (wrap).

I don't think do_wrap() should rewrap the entire current paragraph
(what if it is twenty pages long?), but just the stuff that is pasted,
the current line, and the next line when things are prepended to it.

Benno

-- 
http://www.fastmail.fm - Access all of your messages and folders
                          wherever you are




reply via email to

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