[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
replace.undo.patch
Description: Text Data
- [Nano-devel] undoing replaces in a marked region goes wrong, Benno Schulenberg, 2015/03/27
- Re: [Nano-devel] undoing replaces in a marked region goes wrong, Benno Schulenberg, 2015/03/27
- Re: [Nano-devel] undoing replaces in a marked region goes wrong, Mark Majeres, 2015/03/27
- Re: [Nano-devel] undoing replacements in a marked region goes wrong, Benno Schulenberg, 2015/03/27
- Re: [Nano-devel] undoing replacements in a marked region goes wrong,
Mark Majeres <=
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Benno Schulenberg, 2015/03/28
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Mark Majeres, 2015/03/28
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Benno Schulenberg, 2015/03/29
- Re: [Nano-devel] undoing replacings in a marked region goes wrong, Mark Majeres, 2015/03/31