[Top][All Lists]

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

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

From: Benno Schulenberg
Subject: Re: [Nano-devel] undoing replacings in a marked region goes wrong
Date: Sun, 29 Mar 2015 18:24:25 +0200

On Sat, Mar 28, 2015, at 22:24, Mark Majeres wrote:
> I looked into this a little.  It's like there are two completely
> different scenarios, which do not co-exist.  The case when the entire
> file is being looked at, and the case when only a selection is.  A
> selection is first partitioned out, so the operation is working only
> on a portion of the file.  The undo's being captured are relative to
> this partitioned file.

Yeah, it's as if you're working in a new, separate buffer.  Bummer.

> I think the approach would work best if the
> selection is not partioned, but just recognized as the start and
> ending locations of the do_replace_loop().  In summary,
> do_replace_loop() needs to be reworked so that it will function the
> same for selections and non-selections.

Oof...  But... would that mean that, when replacing things in a selection,
the surrounding text does not disappear from the screen?  But if you then
want to highlight the thing to be replaced, it means the highlighting of
the selected region will have to be temporarily turned off.  Which would
make me panic: "It's going to replace in all of the file!"  The replacement
prompt ("Replace this instance?") will have to clearly say that it is about
a selection: "Replace this instance in the selected region?".

How much work do you think it would be to make the change, from
partitioning to not partitioning?


-- - Email service worth paying for. Try it for free

reply via email to

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