bugGNU nano - Bugs: bug #52482, ^S mutilates the file when the...

 
 

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

bug #52482: ^S mutilates the file when the mark is on

Submitter:  Benno Schulenberg <bens>
Submitted:  Wed 22 Nov 2017 06:56:35 PM UTC
   
 
Severity:  5 - Blocker Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Wed 22 Nov 2017 08:04:32 PM UTC, comment #2: 

Fixed in git, commit cf63a291.

Benno Schulenberg <bens>
Group administrator
Wed 22 Nov 2017 07:45:41 PM UTC, comment #1: 

Bug exists since nano-2.9.0.  The offending commit is 217cfbf3.

Benno Schulenberg <bens>
Group administrator
Wed 22 Nov 2017 06:56:35 PM UTC, original submission:  

To reproduce, run:

  src/nano +2828 src/text.c

Then type:  M-A  <Down> <Down> <Down>  ^S

It says: 3 lines written.

But where did it write the lines to?

Cancel the mark (M-A) and type ^S again.  Now it says that the file on disk has changed!  And asks whether we want to continue saving...  Ouch!  It overwrote the full file with just the few marked lines.  :(

When using ^S, it should ignore the mark.  Only when using ^O (WriteOut), should it offer to write the selected region.

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

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-28 bens Open/ClosedOpen Closed
    2017-11-22 bens StatusNone Fixed
    2017-11-22 bens Summary^S mutilates file when the mark is on ^S mutilates the file when the mark is on

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code