bugGNU nano - Bugs: bug #59981, pasting more than a screenful does...

 
 

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

bug #59981: pasting more than a screenful does not always center the cursor

Submitter:  Benno Schulenberg <bens>
Submitted:  Sun 31 Jan 2021 03:35:16 PM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Mon 01 Feb 2021 02:48:56 PM UTC, comment #3: 

Fixed in git, commit e0a4ee01, by keeping 'focusing' TRUE when it was TRUE before noting that the width of the line numbers changed.  The centering required by a large paste is more important than the minimal scrolling that one normally wants when "resizing" the edit window.

Benno Schulenberg <bens>
Group administrator
Mon 01 Feb 2021 10:07:18 AM UTC, comment #2: 

It has something to do with the paste causing the line numbers to occupy more positions.  Because executing the same recipe on the THANKS file (102 lines) does not result in a cursor on the bottom row.  But when first deleting four lines and then executing the recipe...  Voila: cursor on bottom row.

In fact the problem exist since version 2.8.3 -- one has to use --smooth before version 4.0.  The offending commit is 2b385478: "ensure smooth scrolling when the edit window is resized".  That commit was a fix for bug #50933.

Benno Schulenberg <bens>
Group administrator
Sun 31 Jan 2021 04:56:08 PM UTC, comment #1: 

Bug exists since version 4.0.

The offending commit is 946755a3: "disable hard-wrapping and automatic newlines by default".  ...  I don't get it.  Why does the default setting of SMOOTH_SCROLL affect the line-number case but not numberless case?

Benno Schulenberg <bens>
Group administrator
Sun 31 Jan 2021 03:35:16 PM UTC, original submission:  

To reproduce, first run:

src/nano --ignore README

Then type: ^6 ^V ^N ^N ^N M-6 M-\ ^U
See that after the paste, the cursor is on the center row of the edit window.

Exit from nano and now run:

src/nano --ignore README --line

Then type again: ^6 ^V ^N ^N ^N M-6 M-\ ^U
See that now the cursor is on the bottom row of the edit window.

Expected behavior: also when using line numbers, a paste larger than the screen should center the cursor.

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

    Date Changed by Updated Field Previous Value => Replaced by
    2021-02-25 bens Open/ClosedOpen Closed
    2021-02-01 bens StatusIn Progress Fixed
    2021-02-01 bens StatusNone In Progress

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code