bugGNU nano - Bugs: bug #50877, when using line numbers, switching...

 
 

bug #50877: when using line numbers, switching between buffers can "stammer"

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Tue 25 Apr 2017 06:55:29 PM UTC  
 
Severity: 3 - NormalStatus: 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.

 

(Jump to the original submission Jump to the original submission)

Sun 30 Apr 2017 05:56:18 PM UTC, comment #6:

Fixed in git, 3275c4e5. Thanks for testing.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 27 Apr 2017 08:21:19 PM UTC, comment #5:

It looks good so far, after some quick testing.

David Lawrence Ramsey <dolorous>
Project Administrator
Thu 27 Apr 2017 07:37:23 PM UTC, comment #4:

Here is a first attempt.

It's slightly annoying that now the titlebar and statusbar immediately show the switch but the edit window lags a quarter of a second behind. But in a way it's also nice that there is an immediate reaction to an M-< or M-> keystroke, so the user knows nano saw it.

However, sometimes I see the cursor for a tenth of second at the end of the statusbar message. Don't know how that could be, as the cursor should be always off when writing there.

(file #40521)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 27 Apr 2017 07:00:07 PM UTC, comment #3:

Instead of having a margin per file, we could also revert commit 66356ec7. Then there is no stammer, and no stutter on the statusbar either, but then we have the "color flash" back (bug #49912). We need to find a way to do the color_init() only when edit_refresh() actually gets called and not earlier. So... a boolean like "empty_palette = TRUE" in display_buffer(), and an "if (empty_palette) then color_init()" in edit_refresh(). And color_init() sets empty_palette to FALSE.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 27 Apr 2017 05:06:02 PM UTC, comment #2:

This also means that editwincols, being defined as (COLS - margin), can differ between buffers, but moving that into the openfilestruct as well might be more controversial.

David Lawrence Ramsey <dolorous>
Project Administrator
Thu 27 Apr 2017 04:52:20 PM UTC, comment #1:

It looks as though margin should be moved from being a global to being part of the openfilestruct, since it can differ between buffers.

David Lawrence Ramsey <dolorous>
Project Administrator
Tue 25 Apr 2017 06:55:29 PM UTC, original submission:

To reproduce, run:

stty cols 80 && src/nano --soft --line +1234 NEWS +202 doc/faq.html

Then slowly but repeatedly press M->. See how every time that you switch to the FAQ buffer, nano first draws the content of the buffer with a margin of four, then reconsiders, and draws the content with a margin of three.

Expected behavior: nano should draw the content with the correct margin right away.

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 #40521:  check-the-palette.patch added by bens (2KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dolorous (Posted a comment)
  • -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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 05 May 2017 09:20:03 AM UTCbensOpen/ClosedOpen=>Closed
    Sun 30 Apr 2017 05:56:18 PM UTCbensStatusIn Progress=>Fixed
      Assigned toNone=>bens
    Thu 27 Apr 2017 07:37:23 PM UTCbensAttached File-=>Added check-the-palette.patch, #40521
      StatusNone=>In Progress

    Back to the top


    Powered by Savane 3.1-cleanup1