bugGNU nano - Bugs: bug #65565, reading text from standard input...

 
 

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

bug #65565: reading text from standard input should not be undoable

Submitter:  Benno Schulenberg <bens>
Submitted:  Sun 07 Apr 2024 09:18:56 AM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Open

Sun 07 Apr 2024 09:39:04 AM UTC, comment #1: 

Fixed in git, commit 4ae80825, by changing the 'undoable' flag from TRUE to FALSE in the call to read_file().

Benno Schulenberg <bens>
Group administrator
Sun 07 Apr 2024 09:18:56 AM UTC, original submission:  

When doing for example `nano THANKS`, making a few edits, then thinking better and hammering M-U to undo all edits, then one arrives back at how the file is on disk.

But when one does something like `cat THANKS | nano -`, makes a few edits and then hammers M-U, then the whole text disappears.  This makes no sense and is unexpected.

Nano should treat the data that was read from standard input like if it was read from a file from disk.  This prevents the user from accidentally deleting data that may be hard or impossible to produce again.

(Of course the data is not really deleted, they can get it back with M-E, but still... better not give them a heart attack.  If they want to get rid of the data, "^X N" or "M-\ M-T" are easy enough.)

Benno Schulenberg <bens>
Group administrator

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Date Changed by Updated Field Previous Value => Replaced by
    2024-04-07 bens StatusNone Fixed
        Summaryreading a file from standard input should not be undoable reading text from standard input should not be undoable

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code