bugGNU nano - Bugs: bug #50933, scrolling is not smooth when...

 
 

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

bug #50933: scrolling is not smooth when resizing the window while softwrap is on

Submitter:  Benno Schulenberg <bens>
Submitted:  Wed 03 May 2017 07:55:09 PM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  dolorous Open/Closed:  Closed

Fri 05 May 2017 10:42:11 AM UTC, comment #4: 

Thanks.  Pushed to git, 2b385478.

I've supplemented the fix in the subsequent commit: when toggling nohelp or morespace the cursor could also be pushed offscreen.

Benno Schulenberg <bens>
Group administrator
Thu 04 May 2017 11:54:02 AM UTC, comment #3: 

Good thinking; I wasn't sure whether the variable would be reset properly then, but it seems to be.  Attached an updated version which does this.

(file #40579)

David Lawrence Ramsey <dolorous>
Group Member
Thu 04 May 2017 09:01:19 AM UTC, comment #2: 

Hmm...  If it is the change the ensure_firstcolumn_is_aligned() call makes that makes the focusing = FALSE necessary, wouldn't it make more sense to put the focusing = FALSE in that function?

Benno Schulenberg <bens>
Group administrator
Wed 03 May 2017 10:20:56 PM UTC, comment #1: 

The problem occurs because focusing is set to TRUE, which forces the viewport to center whether or not smooth scrolling mode is on.

The attached patch should fix it.  It sets focusing to FALSE in both places where ensure_firstcolumn_is_aligned() is called, so that the edit_refresh() in both places does things properly (although the first of these edit_refresh()es is indirectly called via total_refresh()).

Note that the patch also fixes an equivalent problem: the cursor can also be moved offscreen by the "resizing" done when line numbering mode is toggled on, if it's near enough to the bottom of the screen beforehand.

(file #40575)

David Lawrence Ramsey <dolorous>
Group Member
Wed 03 May 2017 07:55:09 PM UTC, original submission:  

To reproduce, run:

  src/nano --ignore --smooth --soft +86,68 doc/faq.html

See how "2.8.1" is on the center line of the screen.  Then gently resize the window, making it narrower, and see how "2.8.1" slowly sinks to the bottom of the screen, until... you suddenly lose sight of it because it has jumped to the middle line again.

But --smooth is active: nano should not scroll more than is needed to keep the cursor on the screen.

Expected behavior: when the cursor is "pushed off" the screen by resizing, things are scrolled just enough to bring the cursor back onto the bottom row of the edit window.

Benno Schulenberg <bens>
Group administrator

 

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dolorous (Updated the item)
  • -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-05-19 bens Open/ClosedOpen Closed
    2017-05-05 bens StatusIn Progress Fixed
    2017-05-04 dolorous Attached File- Added 0001-display-ensure-smooth-scrolling-when-resizing-change.patch, #40579
    2017-05-04 bens StatusNone In Progress
        Assigned toNone dolorous
    2017-05-03 dolorous Attached File- Added 0001-display-ensure-smooth-scrolling-when-resizing-change.patch, #40575

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code