[Midnight Commander] #264: Search bug with manpages bold/underlined text

2009-02-09 Thread Ticket System
#264: Search bug with manpages bold/underlined text
-+--
 Reporter:  egmont   |   Owner:   
 Type:  defect   |  Status:  new  
 Priority:  minor|   Milestone:  4.7  
Component:  mc-core  | Version:  4.6.2
 Keywords:   |Blocking:   
Blockedby:   |  
-+--
 Occasionally when you do a simple search (F7) in mc's built-in viewer
 while viewing a manual page, it doesn't find some yellow or red (bold or
 underlined) text.

 Patch attached to fix the problem.

 Example test case: See the attached file that contains abababc in bold
 (that is, each letter followed by a backspace, then the same letter
 again). Search for ababc and it won't match that string, though it
 should.

 Explanation (line numbers according to 4.6.2):
 In src/util.c: _icase_search() line 812-815 you increase e (the haystack
 pointer) and dlng (counitng characters that were skipped because of a
 backspace) every time you skip a character and the subsequent backspace in
 the haystack. Later, in line 819, if the partial match turns out not to be
 a complete one, you rewind the haystack pointer by the number of chars
 matched from the needle (d - text). This, however, forgets about the
 forward steps that were taken in haystack because of the backspaces. So
 next time the substring match starts from the wrong position.

-- 
Ticket URL: www.midnight-commander.org/ticket/264
Midnight Commander www.midnight-commander.org
Midnight Development Center
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: [Midnight Commander] #264: Search bug with manpages bold/underlined text

2009-02-09 Thread Ticket System
#264: Search bug with manpages bold/underlined text
--+-
  Reporter:  egmont   |   Owner:   
  Type:  defect   |  Status:  new  
  Priority:  minor|   Milestone:  4.7  
 Component:  mc-core  | Version:  4.6.2
Resolution:   |Keywords:   
  Blocking:   |   Blockedby:   
--+-

Comment(by egmont):

 (Note that unlike many of my reports, this one has nothing to do with
 utf-8. It's a bug in mainstream mc.)

-- 
Ticket URL: www.midnight-commander.org/ticket/264#comment:1
Midnight Commander www.midnight-commander.org
Midnight Development Center
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel