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

 
 

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

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Wed 22 Nov 2017 06:56:35 PM UTC  
 
Severity: 5 - BlockerStatus: 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.

 

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

Fixed in git, commit cf63a291.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
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:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 28 Nov 2017 08:12:45 PM UTCbensOpen/ClosedOpen=>Closed
    Wed 22 Nov 2017 08:04:32 PM UTCbensStatusNone=>Fixed
    Wed 22 Nov 2017 07:45:41 PM UTCbensSummary^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.1-cleanup1