[Midnight Commander] #266: Backward search doesn't find underlined text

Ticket System tickets at midnight-commander.org
Fri Feb 6 21:10:03 UTC 2009


#266: Backward search doesn't find underlined text
---------------------+------------------------------------------------------
 Reporter:  egmont   |       Owner:       
     Type:  defect   |      Status:  new  
 Priority:  minor    |   Milestone:  4.7  
Component:  mc-core  |     Version:  4.6.2
 Keywords:           |    Blocking:       
Blockedby:           |  
---------------------+------------------------------------------------------
 If you view a manual page in mc's built-in viewer, and do a backward
 search (F7) for some underlined (a.k.a. red) text, it won't match.

 Reason: backward search is implemented by reversing both the haystack and
 the needle and then calling normal (forward) search. Underlined text in
 man pages are implemented by an underscore, followed by a backspace,
 followed by the desired letter. mc's icase_search() ignores the character
 before the backspace to be able to search in man pages. Guess what happens
 however if you reverse an underscored letter in a manpage...

 Obvious consequence: As the Summary shows, backward search doesn't find
 the text you're looking for.

 Funny consequence: If you do a backward search for some underscores, it
 finds every red text.

-- 
Ticket URL: <www.midnight-commander.org/ticket/266>
Midnight Commander <www.midnight-commander.org>
Midnight Development Center


More information about the mc-devel mailing list