bugGNU nano - Bugs: bug #50134, nano misplaces the cursor after a...

 
 

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

bug #50134: nano misplaces the cursor after a replacement at the cursor itself

Submitter:  Benno Schulenberg <bens>
Submitted:  Tue 24 Jan 2017 10:01:05 AM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Wed 25 Jan 2017 10:34:10 AM UTC, comment #2: 

Fixed in git, 3534d8f.

In the reproduction recipe I should have said that, after the three replacements, the cursor now sat after the /first/ "box", not the third.

Benno Schulenberg <bens>
Group administrator
Tue 24 Jan 2017 01:24:48 PM UTC, comment #1: 

When the starting position has been reached again, the cursor position should /not/ be "corrected" after replacing.  Attached patch fixes the problem.

(file #39546)

Benno Schulenberg <bens>
Group administrator
Tue 24 Jan 2017 10:01:05 AM UTC, original submission:  

To reproduce, run 'nano --ignore' and type this line:
bar bar bar
Then type M-\ to bring the cursor back to the beginning, and type:
M-R bar <Enter> box <Enter>
and type Y three times.
The cursor now sits after the third box.  That is wrong.  Because always, when a replacing session is over, the cursor should be back where the session started (although compensated for replacements that took place before the cursor).

Exit and run the same command again, and type:
boo bar bar
Then do the same again: type M-\ followed by:
M-R bar <Enter> box <Enter>
After typing Y twice, the cursor is back at the start of the line.  Good.  As it should be.

The bug is old, since at least nano-2.0.2.

Benno Schulenberg <bens>
Group administrator

 

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

Attached Files
file #39546:  only-until--not-at.patch added by bens (542B - text/x-diff)

 

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 6 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
        StatusIn Progress Fixed
    2017-01-24 bens Attached File- Added only-until--not-at.patch, #39546
        StatusNone In Progress
        Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code