bugGNU nano - Bugs: bug #52504, when the first edit is undone, the...

 
 

bug #52504: when the first edit is undone, the "Modified" marker is not removed

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Sat 25 Nov 2017 06:32:39 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.

 

(Jump to the original submission Jump to the original submission)

Mon 27 Nov 2017 04:50:08 PM UTC, comment #7:

Great, love it!

Peter Passchier <pepa65>
Mon 27 Nov 2017 03:21:16 PM UTC, comment #6:

A second attempt at a fix has been pushed, commit c17a8a98.

Thanks for testing!

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Mon 27 Nov 2017 03:00:43 PM UTC, comment #5:

Oops! It worked fine the last time I tested it. But... then I made a last-minute adjustment. I had the "pristine = FALSE" inside the "while dropit" loop, but then ran 'src/nano --auto +2 NEWS' and typed ^J xx M-U -- it reset the Modified state, but it had clearly rewrapped the paragraph. So I moved the "pristine = FALSE" out of the while loop, but then apparently didn't test it again. :|

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Mon 27 Nov 2017 02:55:49 AM UTC, comment #4:

Thanks for tackling this. Also doesn't work here, Modified keeps showing and on exit permission is asked.

Peter Passchier <pepa65>
Sun 26 Nov 2017 10:43:45 PM UTC, comment #3:

I've reported the magicline issue separately, as bug #52523.

David Lawrence Ramsey <dolorous>
Project Administrator
Sun 26 Nov 2017 10:23:37 PM UTC, comment #2:

After some testing on my end, this doesn't seem to be fixed at all. As of git 20aa167, try the following:

1. Run: ./nano --ignore --nonewlines

2. In the empty buffer, press "x". An "x" will be added at the beginning of the file, as expected.

3. Press Meta-U to undo. The "x" will disappear, but the file will still be marked as modified.

If you repeat this, but run ./nano --ignore (without --nonewlines), then undoing the addition of "x" will not put the file back the way it was due to the magicline, so that's not as much of a problem. Although the fact that undo doesn't put things back the way they were with regard to the magicline in this case is a separate problem.

There's also another example involving multibuffer support.

1. Run: ./nano --ignore --multibuffer winio.c

2. With winio.c open, press Ctrl-R and, at the prompt, insert files.c.

3. Inside files.c, press "x". An "x" will be added at the beginning of files.c, as expected.

4. Press Meta-U to undo. The "x" will disappear, but files.c will still be marked as modified.

5. Close files.c, not saving the changes.

6. Back inside winio.c, press "x". An "x" will be added at the beginning of winio.c, as expected.

7. Press Meta-U to undo. The "x" will disappear, but winio.c will still be marked as modified.

David Lawrence Ramsey <dolorous>
Project Administrator
Sun 26 Nov 2017 08:02:02 PM UTC, comment #1:

Fixed in git, commit 0c9905db.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sat 25 Nov 2017 06:32:39 PM UTC, original submission:

When a file is fully "undone", it would be nice if the "Modified" message in the top-right corner would disappear, and -- when quitting -- nano shouldn't need to ask whether to save modifications, because it is known there aren't any.

(This issue was indirectly reported by Peter Passchier in bug #52446.)

See the attached patch for a fix.

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:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pepa65 (Posted a comment)
  • -unavailable- added by dolorous (Posted a comment)
  • -unavailable- added by bens (Submitted the item)
  • -unavailable- added by bens
  •  

    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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 28 Nov 2017 08:12:53 PM UTCbensOpen/ClosedOpen=>Closed
    Mon 27 Nov 2017 03:21:16 PM UTCbensStatusIn Progress=>Fixed
    Mon 27 Nov 2017 03:00:43 PM UTCbensStatusFixed=>In Progress
    Sun 26 Nov 2017 08:02:02 PM UTCbensStatusIn Progress=>Fixed
    Sat 25 Nov 2017 06:32:39 PM UTCbensAttached File-=>Added 0001-undo-unset-the-Modified-state-when-the-very-first-ed.patch, #42482
      Carbon-Copy-=>Added pepa65

    Back to the top


    Powered by Savane 3.1-cleanup1