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

List:       kde-commits
Subject:    koffice/lib/kotext
From:       David Faure <faure () kde ! org>
Date:       2003-09-26 13:46:13
[Download RAW message or body]

CVS commit by faure: 

Found a new bug while testing search/replace. Happened only with
only one paragraph, and searching backwards.


  M +2 -1      kotextiterator.cc   1.11


--- koffice/lib/kotext/kotextiterator.cc  #1.10:1.11
@@ -300,5 +300,6 @@ QPair<int, QString> KoTextIterator::curr
     {
         if ( m_firstParag == m_lastParag ) // special case, needs truncating at both ends
-            return qMakePair( m_firstIndex, str.mid( m_firstIndex, m_lastIndex - m_firstIndex ) );
+            return forw ? qMakePair( m_firstIndex, str.mid( m_firstIndex, m_lastIndex - m_firstIndex ) )
+                : qMakePair( m_lastIndex, str.mid( m_lastIndex, m_firstIndex - m_lastIndex ) );
         else
             return forw ? qMakePair( m_firstIndex, str.mid( m_firstIndex ) )


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

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