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

 
 

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

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Tue 24 Jan 2017 10:01:05 AM 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 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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
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:
   

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
  • -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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 24 Feb 2017 10:32:18 AM UTCbensOpen/ClosedOpen=>Closed
    Wed 25 Jan 2017 10:34:10 AM UTCbensSeverity3 - Normal=>2 - Minor
      StatusIn Progress=>Fixed
    Tue 24 Jan 2017 01:24:48 PM UTCbensAttached File-=>Added only-until--not-at.patch, #39546
      StatusNone=>In Progress
      Assigned toNone=>bens

    Back to the top


    Powered by Savane 3.1-cleanup1