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

 
 

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

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

Submitter:  Benno Schulenberg <bens>
Submitted:  Tue 24 Jan 2017 12:45:58 PM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Wed 25 Jan 2017 11:09:53 AM UTC, comment #1: 

Fixed in git, 4ed35917.

Benno Schulenberg <bens>
Group administrator
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>
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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-24 bens Open/ClosedOpen Closed
    2017-01-25 bens Severity3 - Normal 2 - Minor
        StatusNone Fixed
        Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code