[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 100107] backward searching a regexp does not work properly
From:       Anders Lund <anders () alweb ! dk>
Date:       2005-02-24 11:32:10
Message-ID: 20050224113210.4693.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=100107         




------- Additional Comments From anders alweb dk  2005-02-24 12:32 -------
On Thursday 24 February 2005 11:11, Jeroen Wijnhout wrote:
> I would appreciate if you could give a hint on how to workaround this,
> since Kile should work with KDE 3.2,3.3 and 3.4.

Well, it seems to be a bug. 

I can't see how it can be worked around, except from fixing the code. But we 
don't release those branches, so even after doing that, it would require your 
users built from the branch.

The change that does the difference is in kdelibs/kate/part/katetextline.cpp. 
The following diff is the result of me fixing the issue for regex search in 
hte 3.3 branch locally:

Index: katetextline.cpp
===================================================================
RCS file: /home/kde/kdelibs/kate/part/katetextline.cpp,v
retrieving revision 1.77.4.4
diff -u -b -r1.77.4.4 katetextline.cpp
--- katetextline.cpp    28 Sep 2004 08:21:10 -0000      1.77.4.4
+++ katetextline.cpp    24 Feb 2005 11:25:58 -0000
 @ -253,6 +253,9  @
   if (backwards)
   {
     int col = startCol;
+
+    // allow finding the string ending at eol
+    if ( col == m_text.length() ) startCol++;
     do {
       index = regexp.searchRev (m_text, col);
       col--;


There is a similar fix for text search, which should be applied as well to 
backport the whole fix, it's marked with the same comment in katetextline.cpp 
in HEAD. The methods to fix are both versions of KateTextLine::searchText().

Would it be of any value to you if I backported the fix to both 3_3 and 3_2 
branches?

-anders
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic