[Top][All Lists]

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

Re: [Nano-devel] found a small failure in the undo stuff

From: Mark Majeres
Subject: Re: [Nano-devel] found a small failure in the undo stuff
Date: Sat, 7 Jun 2014 15:43:12 -0700

> However, testing it, I came across something else.
> To reproduce, open some file, go to the middle of
> some line, and do <Delete> <M-U>, and repeat many
> times.  See how the cursor advances one position on
> every cycle.  Now do <Delete> <Delete> <M-U>, and
> repeat many times -- the cursor returns every time
> to the same place, as expected.
> Also: set the mark, retreat some characters, do ^K
> and M-U -- the cursor is after the end of the uncut
> portion, instead of where it was when the ^K was
> given.  In other words: a backward cut is undone in
> the same way as a forward, but shouldn't: it would
> be more consistent if the cursor were placed at the
> other end.


I fixed the first part of this and also the similar problem that
happens when deleting a line break.

The second part though, I disagree with.  I think the undo/redo of a
cut action should always behave the same, regardless of how the text
was originally selected.  No one will remember if they selected it
backwards or forwards, so it would be confusing to sometimes have the
cursor placed at the end of the cut and sometimes at the start of the
cut.  I didn't look into the effort required to fix this, but as I
recall it would take some time to do.  If anyone feels real strong
about this, I will look into it and fix the behavior.  Scite, gedit,
and Codelite all behave the way it is now.

-Mark Majeres

Attachment: undoredo.4943.patch
Description: Text Data

reply via email to

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