bugGNU nano - Bugs: bug #49796, possible movement code oversight...

 
 

bug #49796: possible movement code oversight (COLS versus editwincols)

Submitted by:  David Lawrence Ramsey <dolorous>
Submitted on:  Wed 07 Dec 2016 06:50:57 PM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: David Lawrence Ramsey <dolorous>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 09 Dec 2016 12:37:40 PM UTC, comment #2:

Yes, the corrections appear to be correct. I haven't bothered trying to find a situation where things go wrong, though -- too hard. Thanks for the patch, applied to git in 62634163.

Benno Schulenberg <bens>
Project Administrator
Wed 07 Dec 2016 08:14:01 PM UTC, comment #1:

Thanks. Will verify in a day or two -- no time now.

Benno Schulenberg <bens>
Project Administrator
Wed 07 Dec 2016 06:50:57 PM UTC, original submission:

I've been looking into the softwrap code some more in the current git version, and, if I understand things correctly, I think I've found an oversight.

Specifically, when the line numbering code was added, and a lot of softwrap-specific code was switched to use editwincols instead of COLS in order to account for the line numbering margin. However, the movement code seems to be missing it in two needed places. ensure_line_is_visible() and do_down() use editwincols, but do_page_up() uses COLS when scrolling up, and do_right() uses COLS when scrolling down.

The attached patch switches these to use editwincols. I haven't found any difference in behavior when testing it so far. Or am I missing something?

David Lawrence Ramsey <dolorous>
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:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Posted a comment)
  • -unavailable- added by dolorous (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
    Tue 13 Dec 2016 11:49:41 AM UTCbensOpen/ClosedOpen=>Closed
    Fri 09 Dec 2016 12:37:40 PM UTCbensStatusNone=>Fixed
      Assigned toNone=>dolorous
      SummaryPossible movement code oversight (COLS versus editwincols)=>possible movement code oversight (COLS versus editwincols)
    Wed 07 Dec 2016 06:50:57 PM UTCdolorousAttached File-=>Added 0001-Fix-possible-oversight-in-movement-code.patch, #39173

    Back to the top


    Powered by Savane 3.1-cleanup1