bugGNU nano - Bugs: bug #50136, when replacing something in a...

 
 

bug #50136: when replacing something in a region, nano overshoots the end

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Tue 24 Jan 2017 12:45:58 PM UTC  
 
Severity: 2 - MinorStatus: 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 25 Jan 2017 11:09:53 AM UTC, comment #1:

Fixed in git, 4ed35917.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 24 Jan 2017 12:45:58 PM UTC, original submission:

To reproduce, run 'nano --ignore NEWS' and type:
^W karma <Enter> M-A <Right> <Right>

See that the cursor is sitting on the letter "r" and that "Ka" is highlighted. The selected region thus consists of just two characters.

Now type: M-R karma <Enter> xxxxx <Enter> Y

See how nano has replaced the whole word "Karma" even though in the selected region that word did not occur. Well, this mistake might be forgivable, but what is strange is that now the cursor is sitting on the quote /after/ "xxxxx".

Also when you replace just "kar" instead of the whole "karma", and replace it with "xxx", the cursor will afterward sit on the "m" instead of on the third "x" -- it has extended the region by one position.

Bug exists since nano-2.4.0 -- since the replacements happen in situ instead of in a separate temporary buffer.

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

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 24 Feb 2017 10:35:25 AM UTCbensOpen/ClosedOpen=>Closed
    Wed 25 Jan 2017 11:09:53 AM UTCbensSeverity3 - Normal=>2 - Minor
      StatusNone=>Fixed
      Assigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1