bugGNU nano - Bugs: bug #51790, line numbering is inaccurate on...

 
 

bug #51790: line numbering is inaccurate on softwrapped rows with straddling tabs

Submitted by:  David Lawrence Ramsey <dolorous>
Submitted on:  Fri 18 Aug 2017 09:46:12 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.

 

Sat 19 Aug 2017 06:56:59 PM UTC, comment #2:

Fixed in git, 5fcda555. Thanks for the patch.

Benno Schulenberg <bens>
Project Administrator
Fri 18 Aug 2017 09:48:40 PM UTC, comment #1:

The attached patch should fix it. The problem was that edit_draw(), when checking for softwrapped parts of lines, was looking at the starting index instead of the starting column, and the former is thrown off when straddling tabs are in place.

(file #41576)

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.
Fri 18 Aug 2017 09:46:12 PM UTC, original submission:

1. With current git (54a9261), in an 80x24 terminal, run:

src/nano --ignore -T 181 --soft --linenum NEWS

2. Press Meta-P to turn on whitespace display.

Note that all line chunks with straddling tabs get line numbers, even if they're softwrapped, so lines 2, 3, and 4 get numbered three times each instead of once.

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

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 28 Aug 2017 07:10:50 PM UTCbensOpen/ClosedOpen=>Closed
    Sat 19 Aug 2017 06:56:59 PM UTCbensStatusNone=>Fixed
      Assigned toNone=>dolorous
    Fri 18 Aug 2017 09:48:40 PM UTCdolorousAttached File-=>Added 0001-display-fix-line-numbers-on-softwrapped-lines-with-s.patch, #41576

    Back to the top


    Powered by Savane 3.1-cleanup1