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

 
 

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

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

Submitter:  David Lawrence Ramsey <dolorous>
Submitted:  Fri 24 Feb 2017 05:57:58 AM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  dolorous Open/Closed:  Closed

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

 

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

No files currently attached

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2017-04-02 bens Open/ClosedOpen Closed
    2017-02-24 bens StatusNone Fixed
        Assigned toNone dolorous

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code