bugGNU nano - Bugs: bug #46591, indenting confuses the undo system

 
 

bug #46591: indenting confuses the undo system

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Wed 02 Dec 2015 06:44:03 PM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 09 Jan 2016 04:18:29 PM UTC, comment #2:

Bug #46860 requests the undo system to also cover indenting/unindenting.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 03 Dec 2015 09:36:24 AM UTC, comment #1:

The temporary mistake prevention went into SVN, r5474, plus notes about this in the documentation, r5475.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 02 Dec 2015 06:44:03 PM UTC, original submission:

Indenting or unindenting will make the undo items add and remove the wrong characters.

For example, run 'src/nano --ignore +6 README', and type:

^Space ^Space big Space Home
M-A Down Down Down
Shift+Alt+} Shift+Alt+{
M-U

See how "ano " is deleted instead of "big ".

I think that -- as with bug #45531 -- it is better to sacrifice the undo stack than to do the wrong thing when the user hits M-U.

The proper fix is, of course, to instrument the indenting routine with add_undo() and update_undo() calls, but that will require much more thinking. So, as a temporary measure...

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 22 Jul 2016 03:04:51 PM UTCbensStatusReady For Test=>Fixed
    Sat 09 Jan 2016 04:18:29 PM UTCbensOpen/ClosedOpen=>Closed
    Thu 03 Dec 2015 09:36:24 AM UTCbensStatusNone=>Ready For Test

    Back to the top


    Powered by Savane 3.1-cleanup1