Version: 2.3.2 (using KDE 3.3.2, compiled sources) Compiler: gcc version 3.3.2 20031022 (Red Hat Linux 3.3.2-1) OS: Linux (i686) release 2.4.22-1.2115.nptl When block (or box, as you may call it) selection is on, but NOTHING is selected, find and replace do not work, meaning they open their window but do not find any instance of the text you are searching for. If you, instead, select a block of text and search inside the selection, it works. Shortly: - switch to block selection - do a "find" on something you are sure is in the file (but without selecting it) - kate will say "search string not found". I would expect it to find the search string no matter which selection mode I'm in. But maybe is a deliberate behaviour of which I don't get the reason... Thanks anyway!
Hi, this bug is still present in 3.4.0 beta2: Kate 2.4 (using KDE 3.3.92 (beta2))
hmm, in deed :/ could somebody tell me what this does in doSearch() ? do { if( regExp ) { m_re = QRegExp( text, caseSensitive ); found = doc()->searchText( line, col, m_re, &foundLine, &foundCol, &matchLen, backward ); } else if ( wholeWords ) { QRegExp re( "\\b" + text + "\\b", caseSensitive ); found = doc()->searchText( line, col, re, &foundLine, &foundCol, &matchLen, backward ); } else { found = doc()->searchText( line, col, text, &foundLine, &foundCol, &matchLen, caseSensitive, backward ); } if ( found && s.flags.selected ) { if ( !s.flags.backward && KateTextCursor( foundLine, foundCol ) >= s.selEnd || s.flags.backward && KateTextCursor( foundLine, foundCol ) < s.selBegin ) found = false; else if (m_view->blockSelectionMode()) { if ((int)foundCol < s.selEnd.col() && (int)foundCol >= s.selBegin.col()) break; } } line = foundLine; col = foundCol+1; } while (m_view->blockSelectionMode() && found); why the while (...blockSele...) stuff?
isn't this a duplicate of the already close bug #66022 ???
SVN commit 467563 by cullmann: fix one block selection search bug ;) BUG: 97140 M +3 -2 katesearch.cpp --- branches/KDE/3.5/kdelibs/kate/part/katesearch.cpp #467562:467563 @@ -596,7 +596,7 @@ found = false; else if (m_view->blockSelectionMode()) { - if ((int)foundCol < s.selEnd.col() && (int)foundCol >= s.selBegin.col()) + if ((int)foundCol < QMAX(s.selEnd.col(), s.selBegin.col()) && (int)foundCol >= QMIN(s.selEnd.col(), s.selBegin.col())) break; } } @@ -604,7 +604,8 @@ line = foundLine; col = foundCol+1; } - while (m_view->blockSelectionMode() && found); + while (s.flags.selected && m_view->blockSelectionMode() && found); + // in the case we want to search in selection + blockselection we need to loop if( !found ) return false;