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

 
 

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

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

Submitter:  Benno Schulenberg <bens>
Submitted:  Tue 25 Apr 2017 06:55:29 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

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>
Group administrator
Thu 27 Apr 2017 08:21:19 PM UTC, comment #5: 

It looks good so far, after some quick testing.

David Lawrence Ramsey <dolorous>
Group Member
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>
Group administrator
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>
Group administrator
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>
Group Member
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>
Group Member
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>
Group administrator

 

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

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

    Date Changed by Updated Field Previous Value => Replaced by
    2017-05-05 bens Open/ClosedOpen Closed
    2017-04-30 bens StatusIn Progress Fixed
        Assigned toNone bens
    2017-04-27 bens Attached File- Added check-the-palette.patch, #40521
        StatusNone In Progress

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code