Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.

#27 mini bugs during "undo" in Nedit 5.20


Make a rectangle selection and paste it to another
place. Then
press "ctrl+Z" --- some lines is highlighted


  • Scott Tringali

    Scott Tringali - 2001-05-16

    Logged In: YES

    I think this is a new feature (auto-select forces selection
    of undone text). Steve, can you verify?

    Maybe we should make this a preference to avoid confusing

  • Scott Tringali

    Scott Tringali - 2001-05-16
    • milestone: --> development
    • assigned_to: nobody --> slobasso
    • summary: mini bugs during "undo" in Nedit 5.20 --> mini bugs during "undo" in Nedit 5.20
  • Steve LoBasso

    Steve LoBasso - 2001-05-16

    Logged In: YES

    I've tried to make it so this doesn't happen in the past.
    Unfortunately, it was not possible with the level of changes
    that I was willing to make. At first it seems like it's
    possible, but as you get deeper into it, you find that it
    just creates more problems. The best solution I've thought
    of is to have the undo/redo buffers work with rectangular
    inserts and deletes rather than the way they are now stored.
    Right now the text that gets selected is what the buffers
    are storing.

    There's another problem too. If you drag a text block,
    either normal or rectangular, it considers everything from
    the block's original position to it's new position the
    changed text. Both of these problems have the possibility of
    making the undo/redo buffers much larger than they need to

    I really need to look into these issues, but I don't see
    myself having time for at least a few weeks. Either way I
    don't think it's worse than the old method since the insert
    position was set to a similar awkward position and possibly
    left an existing selection in another part of the buffer. As
    for a preference, I'd rather that we exhaust the
    possibilities of fixing the problem before we create yet
    another preference, especially since the other option would
    produce results that could equally be listed as a bug.

  • Eddy De Greef

    Eddy De Greef - 2001-05-17

    Logged In: YES

    Irrespective of whether it works perfectly or not,
    I vote for making this behaviour preferencable too.
    I've been using it for several months now, and I
    still can't get used to it. _Especially_ when I have
    an existing selection, I don't want undo/redo to
    destroy it and make a new one.
    I have several macros that are sensitive to/
    operate on selections, and many times they don't
    work as I expected because of a (new) selection
    created by undo/redo.

    Whether the old behaviour was worse or not is just
    a matter of taste. I liked it better.

    I think that, as a general rule, any change
    in behaviour that is not a clear win, should
    be preferencable (at least via an X resource).

  • Steve LoBasso

    Steve LoBasso - 2001-05-17

    Logged In: YES

    I think we've got two issues here.
    One is the obvious minor bug of what gets selected.
    The other is that some people may not want the selection
    changed under any circumstances, others may want the
    selection restored exactly as it was, even if that wasn't
    what changed, and of course other people want to have the
    changed text selected, even if the last change had nothing
    to do with the selection.

    As for the first issue, I personally am not willing to make
    a preference to get around a bug until we've exhausted the
    possibility of fixing the bug or decided it can't/won't be
    fixed. Making the decision to use a preference at this point
    is a feature, not a bug fix. Later that may change.

    As for the second issue, I considered making this a
    preference, but Mark said it shouldn't be one. At that
    point, I left it alone.

    As for my comment on the old behavior being bad had little
    to do with selections. The intent of the old code was to
    show what changed by setting the insertion point to the end
    of what changed. In the case of rectangular cut/paste/delete
    operations, it was just wrong. It would be at the end of the
    last modified line rather than the bottom right of the
    changed rectangle.
    It was just adding insult to injury when an immediate use of
    the delete key caused text somewhere else in my buffer to be

  • Eddy De Greef

    Eddy De Greef - 2001-05-18

    Logged In: YES

    I was not suggesting at all to add a preference
    to work around a bug.

    I just would prefer that undo/redo does not create new
    selections. It forces me to take additional "dummy"
    actions to destroy the selection (like moving the
    cursor back and forth, or clicking with the mouse)
    in many cases.

    I agree that keeping existing selections can cause
    some unpleasant surprises when you hit the delete key.
    Therefore, _if_ we decide to make the behavior
    preferencable, I would also opt for a preference with
    3 choices:
    - position cursor + select changed text (current behavior)
    - position cursor + destroy existing selection
    - position cursor + keep existing selection (old behavior)

    Sure, the main issue here is still the fact that the
    current selection behaviour may not be accurate.

  • Alexander Mai

    Alexander Mai - 2001-08-19
    • status: open --> open-postponed
  • Alexander Mai

    Alexander Mai - 2001-08-19

    Logged In: YES

    Obviously nothing for 5.2GA ...

  • Alexander Mai

    Alexander Mai - 2001-08-19
    • priority: 5 --> 4
    • summary: mini bugs during "undo" in Nedit 5.20 --> mini bugs during "undo" in Nedit 5.20
  • Steve LoBasso

    Steve LoBasso - 2001-08-20

    Logged In: YES

    I do plan on eventually working on this. It's just a very
    complicated issue.
    Hopefully in 5.3.

  • Scott Tringali

    Scott Tringali - 2003-06-21

    Logged In: YES

    There is a preference for this now, though it needs
    documentation. This doesn't appear to be getting fixed any
    time soon, and it's probably better to make the default the
    way it used to be.

  • Thorsten Haude

    Thorsten Haude - 2005-11-25

    Logged In: YES

    Two issues here:
    1. Undo modifies selection -- this is fixed.
    2. Undo selection range of rectangular selection is not as
    Scott expects it. I must admit that I don't see where the
    problem is, could you give another example?

  • Thorsten Haude

    Thorsten Haude - 2007-03-05

    Logged In: YES
    Originator: NO

    Any news on this?


Log in to post a comment.