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

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitter:  Benno Schulenberg <bens>
Submitted:  Sat 25 Nov 2017 06:32:39 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

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>
Group administrator
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>
Group administrator
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>
Group Member
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>
Group Member
Sun 26 Nov 2017 08:02:02 PM UTC, comment #1: 

Fixed in git, commit 0c9905db.

Benno Schulenberg <bens>
Group administrator
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>
Group administrator

 

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-28 bens Open/ClosedOpen Closed
    2017-11-27 bens StatusIn Progress Fixed
    2017-11-27 bens StatusFixed In Progress
    2017-11-26 bens StatusIn Progress Fixed
    2017-11-25 bens Attached 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.13-d3ae.
    Corresponding source code