GNU nano - Bugs: bug #52523, undoing text added to the...
You are not allowed to post comments on this tracker with your current authentication level.
bug #52523: undoing text added to the magicline doesn't delete the new magicline
Submitter: | David Lawrence Ramsey <dolorous> | ||
Submitted: | Sun 26 Nov 2017 10:42:24 PM UTC | ||
Severity: | 3 - Normal | Status: | Fixed |
Assigned to: | dolorous | Open/Closed: | Closed |
Jump to the original submission
Wed 03 Jan 2018 02:28:57 PM UTC, comment #12: |
Benno Schulenberg <bens> |
Thu 30 Nov 2017 08:24:42 PM UTC, comment #11: Thanks. But... the magicline creation should not be moved inside a NANO_TINY thing -- I think. So... after updating that, and after updating the final comment in the patch to the new situation, pushed: b9638cb7. |
Benno Schulenberg <bens> |
Tue 28 Nov 2017 11:27:27 PM UTC, comment #10: Okay. Attached updated version that doesn't use the global. |
David Lawrence Ramsey <dolorous> |
Tue 28 Nov 2017 06:59:29 PM UTC, comment #9: I don't like the solution with another global variable. :| It should be possible to correctly detect the addition of magic line locally.
|
Benno Schulenberg <bens> |
Mon 27 Nov 2017 09:29:33 PM UTC, comment #8: Okay. However, after more testing, the last patch doesn't always detect the magicline properly. With it applied, run:
|
David Lawrence Ramsey <dolorous> |
Mon 27 Nov 2017 08:13:35 PM UTC, comment #7: Oh, but nano not removing the added magicline but clearing the "Modified" flag and allowing the user to exit immediately (without being asked whether to save), really isn't a nasty bug. Because for all intents and purposes (of the user) the file was unmodified, so it is perfectly fine to exit without saving.
|
Benno Schulenberg <bens> |
Mon 27 Nov 2017 08:04:43 PM UTC, comment #6: David: Thanks for the patch. Looks good. Will apply somewhere in the coming days.
|
Benno Schulenberg <bens> |
Mon 27 Nov 2017 05:36:10 PM UTC, comment #5: Peter: Yes, automatic modification is bad, and it shouldn't be difficult to fix.
|
David Lawrence Ramsey <dolorous> |
Mon 27 Nov 2017 05:33:59 PM UTC, comment #4: Hmm I see what you mean, that is a nasty bug. Because it just allowed me to close no questions asked, I assumed the file was unchanged. But if you save it after undo, it has the CR.
|
Peter Passchier <pepa65> |
Mon 27 Nov 2017 05:23:03 PM UTC, comment #3: Peter: I've tested it with c17a8a9, and if you toggle line numbering mode, you can see the magicline added by the text is still there.
|
David Lawrence Ramsey <dolorous> |
Mon 27 Nov 2017 04:55:44 PM UTC, comment #2: Following the recipe with c17a8a98364d7258455227e9927af286ebc557dc it now seems to work, the magicline is removed when doing Undo. |
Peter Passchier <pepa65> |
Mon 27 Nov 2017 03:27:18 PM UTC, comment #1: True... if you "undo" text added to the magicline, the extra magicline that was produced by adding the text is then not deleted. But... I cannot be bothered about it. If you have a simple patch for this, fine. But if not... it are harmless newlines at the end of a file. |
Benno Schulenberg <bens> |
Sun 26 Nov 2017 10:42:24 PM UTC, original submission:
This can be reproduced as follows:
|
David Lawrence Ramsey <dolorous> |
Depends on the following items: None found
Items that depend on this one: None found
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 9 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2018-01-03 | bens | Open/Closed | Open | Closed | |
2017-11-30 | bens | Status | In Progress | Fixed | |
2017-11-28 | dolorous | Attached File | - | Added 0001-undo-if-added-text-adds-a-magicline-make-undo-redo-h.patch, #42513 | |
2017-11-27 | dolorous | Attached File | - | Added 0001-undo-if-added-text-adds-a-magicline-make-undo-redo-h.patch, #42504 | |
2017-11-27 | bens | Status | None | In Progress | |
Assigned to | None | dolorous | |||
2017-11-27 | dolorous | Attached File | - | Added 0001-undo-if-added-text-adds-a-magicline-make-undo-redo-h.patch, #42502 | |
2017-11-27 | dolorous | Attached File | - | Added 0001-undo-if-added-text-adds-a-magicline-make-undo-remove.patch, #42501 | |
2017-11-27 | bens | Summary | undoing text added to the magicline doesn't put the old magicline back | undoing text added to the magicline doesn't delete the new magicline |
Powered by Savane 3.13-f8d8.
Corresponding source code
Released in 2.9.2. Thanks for reporting.