bugGNU nano - Bugs: bug #65445, with --softwrap and small files,...

 
 

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

bug #65445: with --softwrap and small files, the indicator has a wrong size

Submitter:  Benno Schulenberg <bens>
Submitted:  Mon 11 Mar 2024 09:48:22 AM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Open

Mon 11 Mar 2024 10:33:18 AM UTC, comment #2: 

Fixed in git, commit 8cf61af5, by not readjusting the scroller size for small files when --softwrap is active.  (This might leave some room at the bottom of the scroller when actually all lines of the file are onscreen, but... I can live with that small discrepancy.)

Benno Schulenberg <bens>
Group administrator
Mon 11 Mar 2024 10:26:39 AM UTC, comment #1: 

The offending commit is 49d8b99e: "avoid time-consuming computations, to burden large files less".  The adjustment of the scroller size (for when softwrapping) two commits later (commit f54bc6c7) forgot to not readjust 'highest' when softwrapping.

Benno Schulenberg <bens>
Group administrator
Mon 11 Mar 2024 09:48:22 AM UTC, original submission:  

To reproduce, run:

for row in $(seq 23); do
  for quad in $(seq 37); do echo -n "oooo"; done; echo;
done  >oos

src/nano --ignore --soft --line --zero --indicator  +1 oos

(The latter command should be run on a default xterm, -geometry 80x24.)

See that the indicator occupies a little more than half the height of the window, which seems to fit the facts.

Now increase the height of the xterm window by one row.  Hoppa: suddenly the indicator has the full height of the window.  What!?  Why?!

Now reduce the width of the window until only line numbers 1 to 4 are visible.  The indicator still occupies the full height of the window, even though less than a fifth of the buffer is visible.  :/

Now reduce the height of the window by one row.  Hops: suddenly the indicator fills just about one fifth of the window's height, correctly.

Apparently the bottom end of the indicator is put at the bottom of the window whenever the non-softwrapped buffer would fit in its entirety in the edit window.

(Bug was found while looking at a small binary file and switching softwrap on.)

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

    Date Changed by Updated Field Previous Value => Replaced by
    2024-03-11 bens Severity3 - Normal 2 - Minor
        StatusNone Fixed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code