nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] undoing replacements in a marked region goes wrong


From: Mark Majeres
Subject: Re: [Nano-devel] undoing replacements in a marked region goes wrong
Date: Fri, 27 Mar 2015 22:28:53 -0700

On 3/27/15, Benno Schulenberg <address@hidden> wrote:
>
> On Fri, Mar 27, 2015, at 17:08, Mark Majeres wrote:
>> The mark is being set to false prior to calling do_replace_loop() for
>> all cases, from what I see.  So any code that checks the mark or sets
>> it would be irrelevant inside do_replace_loop().
>
> It's not setting or checking the mark, it's checking whether it's
> doing replacements in just a part of the buffer (the region that
> was formerly marked).  If so, it tries to do the same thing your
> last patch does: compensate for the change in length of the last
> line of the region -- but it does this while still busy replacing,
> instead of at the end.  Confusing.
>

Yes, I don't know what I was looking at.  That chunk of code is confusing.

I attached a patch that resolves the undo issue, but only if the
selection does not span more than one line.

--Mark

Attachment: replace.undo.patch
Description: Text Data


reply via email to

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