bugGNU nano - Bugs: bug #67581, a backward relative jump can go...

 
 

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

bug #67581: a backward relative jump can go beyond top of buffer

Submitter:  Benno Schulenberg <bens>
Submitted:  Sun 05 Oct 2025 10:10:52 AM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Discussion

Sun 05 Oct 2025 10:30:41 AM UTC, comment #1: 

Fixed in git, commit 50e186bc, by preventing 'line' from going somewhere before line 1.

Benno Schulenberg <bens>
Group administrator
Sun 05 Oct 2025 10:10:52 AM UTC, original submission:  

To reproduce, run `src/nano +42 README`.  Note that the file contains 122 lines.
Type: M-G ++145 <Enter>
See that the cursor now sits at the end of the file.

Go back to line 42 with: M-G 42 <Enter>
Now type: M-G --145 <Enter>
See that the cursor sits on line 21 (which is 103 lines from the end of the file: 145-42).  This is not right.

When a relative jump goes beyond the top of the file, it should go there instead of beyond it, just like when it goes beyond the end of the file.

(The original report was by Ivan Vorontsov in https://lists.gnu ... -10/msg00000.html.)

Benno Schulenberg <bens>
Group administrator

 

Attached Files

This item currently has no attached files.

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

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

    Votes

    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.

     

    History

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2025-11-13 bens Open/ClosedOpen Closed
    2025-10-05 bens StatusIn progress Fixed

    Back to the top

    Powered by Savane 3.16-ed84.
    Corresponding source code