bugGNU nano - Bugs: bug #49462, with softwrap, the viewport is...

 
 

bug #49462: with softwrap, the viewport is sometimes not properly placed at startup

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Thu 27 Oct 2016 07:10:44 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.

 

Fri 28 Oct 2016 09:07:22 AM UTC, comment #2:

Fixed in git, 9c2e270.

(But the fix is incomplete, because when the terminal is very narrow and --linenumbers is given, the target placement is done as if there were no line numbers -- but there will be, so the number of wraps will be higher when the screen is finally drawn... Anyway, this whole softwrap business is a chapuza.)

Closing, because an unreleased bug.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Fri 28 Oct 2016 08:54:05 AM UTC, comment #1:

No, the diagnosis was wrong: the logic with 'needed_margin' is fine. It was the removal of the early setting of 'editwincols = COLS - margin' that caused this regression. 'editwincols' is needed early on so that +NN on the command line will work.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Thu 27 Oct 2016 07:10:44 PM UTC, original submission:

This is somewhat hard to reproduce. On a terminal of 30 lines and 127 columns, run 'src/nano --ignore --soft +81 doc/faq.html'. The target line is at the bottom of the screen (with a large softwrapped part invisible) instead of in the center of the screen.

It is commit 023edff that broke this. Weird! ...

Hmmm... I see. 'needed_margin' shouldn't even be computed (let alone compared to anything) when LINE_NUMBERS isn't set. Okay. Will fix that tomorrow.

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:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 28 Oct 2016 09:07:22 AM UTCbensStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1