[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [PATCH 3/3] filtering: pair the cut and the insert, so
From: |
Benno Schulenberg |
Subject: |
Re: [Nano-devel] [PATCH 3/3] filtering: pair the cut and the insert, so they can be undone together |
Date: |
Tue, 22 May 2018 11:36:26 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
Op 21-05-18 om 23:46 schreef Marco Diego Aurélio Mesquita:
> On Mon, May 21, 2018 at 6:36 PM, Marco Diego Aurélio Mesquita
> <address@hidden> wrote:
>> Found a bug. How to reproduce it:
>>
>> ./src/nano README
>>
>> Mark the lines 27 to 32 (inclusive). Press ^R^XM-\M-Fcat^MM-U^XM-U
Superb! I never noticed that, when undoing the insertion in the
second buffer, it said on the status bar "Nothing to undo". :|
So you see: just another pair of eyes helps a lot. Thanks!
> Quick solution: the calls to add_undo and update_undo in
> execute_command should be conditioned by !ISSET(MULTIBUFFER).
>
> The change seems to fix the problem here. Benno, do you agree with it?
Yes -- these undo items should only be added when doing a real cut
(that is: when doing the filtering in the buffer itself), not when
doing a copy (when sending the filtered stuff to a new buffer).
Thanks for the fix. I have arranged the things a bit differently,
though -- see the upcoming patch set. I've also elided the pipe_tag
from the first patch, as it was used only once.
Benno
signature.asc
Description: OpenPGP digital signature