[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [PATCH] Pipe selected text to external tool
From: |
Marco Diego Aurélio Mesquita |
Subject: |
Re: [Nano-devel] [PATCH] Pipe selected text to external tool |
Date: |
Sun, 18 Feb 2018 09:21:25 -0300 |
On Sun, Feb 18, 2018 at 2:46 AM, David Ramsey <address@hidden> wrote:
> Marco Diego Aurélio Mesquita:
>> Only inconvenience now is that undo needs two steps: one to undo the
>> insertion and another to undo the cut. I don't know what is the best
>> way to fix it.
>
> What you're really trying to accomplish here is to treat this two-step
> process:
>
> 1) Remove text spanning multiple lines.
>
> 2) Insert different text spanning multiple lines in the place of the
> original text spanning multiple lines.
>
> as one undoable action: multiline text replace. However, there's no
> undo type for that; the existing undo type for text replace only works
> within single lines.
>
So, is it better to introduce a new undo type?
Can you give some hints/tips/advice on how to do it?
>From what I see in do_cut_text_void, it looks like it is possible to
remove text without disturbing undo. The read_file function has a
parameter specific to not disturb undo. How should the new undo type
be implemented? Should a add_undo be called before removing text and
update_undo after insertion or should there be an intermediate update
between both calls?
- Re: [Nano-devel] how should piping through an external command work?, (continued)
- Re: [Nano-devel] how should piping through an external command work?, Brand Huntsman, 2018/02/18
- Re: [Nano-devel] how should piping through an external command work?, Benno Schulenberg, 2018/02/19
- [Nano-devel] Fwd: Re: how should piping through an external command work?, Benno Schulenberg, 2018/02/19
- Re: [Nano-devel] Fwd: Re: how should piping through an external command work?, Brand Huntsman, 2018/02/19
- Re: [Nano-devel] Fwd: Re: how should piping through an external command work?, Benno Schulenberg, 2018/02/20
Re: [Nano-devel] [PATCH] Pipe selected text to external tool, David Ramsey, 2018/02/18
- Re: [Nano-devel] [PATCH] Pipe selected text to external tool,
Marco Diego Aurélio Mesquita <=
Re: [Nano-devel] [PATCH] Pipe selected text to external tool, David Ramsey, 2018/02/18