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

 
 

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

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

Submitter:  David Lawrence Ramsey <dolorous>
Submitted:  Wed 07 Dec 2016 06:50:57 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  dolorous Open/Closed:  Closed

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>
Group 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>
Group 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>
Group Member

 

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

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by dolorous (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
    2016-12-13 bens Open/ClosedOpen Closed
    2016-12-09 bens StatusNone Fixed
        Assigned toNone dolorous
        SummaryPossible movement code oversight (COLS versus editwincols) possible movement code oversight (COLS versus editwincols)
    2016-12-07 dolorous Attached File- Added 0001-Fix-possible-oversight-in-movement-code.patch, #39173

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code