bugGNU nano - Bugs: bug #50389, spotlight() doesn't highlight...

 
 

bug #50389: spotlight() doesn't highlight words properly in softwrap mode

Submitted by:  David Lawrence Ramsey <dolorous>
Submitted on:  Fri 24 Feb 2017 05:57:58 AM 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 24 Feb 2017 02:14:37 PM UTC, comment #1:

Nice! Good fix. Thanks for the patch. I've pushed it as 6e9d6a08, but without the optimization for xplustabs(): replacements that use spotlight() take place interactively, which means: at less than typing speed, which means there is no hurry at all. Only when a routine is run ten or twenty or more times in a row in a tight loop does it pay to optimize a bit.

Benno Schulenberg <bens>
Project Administrator
Fri 24 Feb 2017 05:57:58 AM UTC, original submission:

(Mistakenly first filed this in the patch section, #9268; the patch to fix it should be there, though.)

In current git, spotlight() always assumes we're not in softwrap mode, even when that isn't the case, and doesn't highlight words at the edges of the screen properly as a result. An example problem can be reproduced as follows:

1. In an 80x24 terminal, run "nano --ignore --softwrap spotlight-test.txt" (the file is attached).

2. Press Ctrl-W Ctrl-R to get the replace prompt.

3. Attempt to replace "80x24" with "????". The first (and only) "80x24" will be highlighted wrongly. Even though it's spread across two lines, to make one line end in "80" and the line after that begin with "x24", the highlight will display "8$" on the first line and not display anything highlighted on the second line, since it assumes non-softwrap mode's horizontal scrolling.

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:
   

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 (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 02 Apr 2017 09:48:35 AM UTCbensOpen/ClosedOpen=>Closed
    Fri 24 Feb 2017 02:14:37 PM UTCbensStatusNone=>Fixed
      Assigned toNone=>dolorous

    Back to the top


    Powered by Savane 3.1-cleanup1