bugGNU nano - Bugs: bug #58634, the indicator sometimes shifts one...

 
 

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

bug #58634: the indicator sometimes shifts one block when resizing with --softwrap

Submitter:  Benno Schulenberg <bens>
Submitted:  Sat 20 Jun 2020 05:50:03 PM UTC
   
 
Severity:  2 - Minor Status:  Invalid
Assigned to:  None Open/Closed:  Closed

Sat 12 Dec 2020 02:08:26 PM UTC, comment #1: 

The indicator "jumping" is just an arttifact of the calculation.  In current git, the given reciped does not preduce any jumping.  Only when I check out v4.9.3, do I see the "jumping" again (for slightly different column numbers, though).  What happens is that when making the screen narrower, a few more lines above the cursor get softwrapped than below the cursor, pushing the calculation of the place of the indicator just across an integer boundary, meaning that it gets placed one row further.  When the screen gets still narrower, soon all lines will be softwrapped and the calculation drops under the integer boundary again.

In short: it's an artifact of softwrapping, of not all lines getting softwrapped at the same time.

Benno Schulenberg <bens>
Group administrator
Sat 20 Jun 2020 05:50:03 PM UTC, original submission:  

To reproduce, make your terminal screen 35 rows high and 80 columns wide.  Then run:

src/nano --ignore --line --soft --indicator +444 NEWS

Note that the indicator is just one block, and that it sits at the end of line 435.  Now start shrinking the width of the terminal, one column at a time.  See that the indicator block shifts one block down when the terminal becomes 77 columns wide.  The block jumps one up again when the terminal becomes 71 columns.  There it stays for most of the shrinking, except it shortly jumps one block down again for the widths of 41 and 40 columns.

What's up with this?  Is this the result of some rounding error?  Or is it --softwrap somehow causing nano to miscalculate the row on which to draw the scrollbar?

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

    Date Changed by Updated Field Previous Value => Replaced by
    2020-12-21 bens Open/ClosedOpen Closed
    2020-12-12 bens StatusNone Invalid
    2020-06-24 bens Summarythe indicator can shift one block when resizing with --softwrap the indicator sometimes shifts one block when resizing with --softwrap
    2020-06-24 bens Summarysomething is wrong with the scrollbar when resizing with --softwrap the indicator can shift one block when resizing with --softwrap

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code