[Top][All Lists]

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

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

From: Mark Majeres
Subject: Re: [Nano-devel] the wrapping of long insertions
Date: Sun, 15 Jun 2014 09:38:27 -0700

> Thanks.  However, please try and make separate patches
> for separate issues.  I've dropped the undidmsg stuff from
> the attached reformatted patch.  With this patch applied
> I see some unexpected behaviour when using autoindentation.
> Start nano with  src/nano +2 -I -i -r77 ChangeLog
> and then type:  <Enter>  <M-A>  <Down>  <^K>
> <^Space>  <^Space>  <^Space>  two words  <^U>
> The line is obviously far too long, and the next line has not
> been indented.
> In the patch, you have dropped some things that were specific
> to autoindentattion.  Probably something like that is needed
> after all?


Sorry about combining issues into one patch, I've tried to be more
aware of this, it slipped past me.

The auto-indentation code that I removed was no longer functional in
do_wrap().  The call to do_enter() has the logic for indenting the
wrapped text, so if there is a problem, that would be the place to

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.

I could move the cursor back to the location where the paste was
issued and then call do_wrap, I suppose, but this will also have side
effects.  What should happen if the cutbuffer has multiple lines?
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). So unless the
wrap function will consider all of the effected lines, the solution to
the problem presented should be placed on the user.  They need to
select the text without the line break.


reply via email to

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