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

List:       kde-commits
Subject:    KDE/kdelibs/kate/view
From:       Pascal Létourneau <pascal.letourneau () gmail ! com>
Date:       2010-10-17 18:50:41
Message-ID: 20101017185041.35E2DAC897 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1186853 by pletourn:

Don't loop forever

BUG:254048


 M  +2 -2      kateviewinternal.cpp  


--- trunk/KDE/kdelibs/kate/view/kateviewinternal.cpp #1186852:1186853
@@ -878,7 +878,7 @@
     switch( bias ) {
     case KateViewInternal::left:  return column() == 0;
     case KateViewInternal::none:  return atEdge();
-    case KateViewInternal::right: return column() == doc()->lineLength( line() );
+    case KateViewInternal::right: return column() >= doc()->lineLength( line() );
     default: Q_ASSERT(false); return false;
     }
   }
@@ -977,7 +977,7 @@
 
     if (n >= 0) {
       for (int i = 0; i < n; i++) {
-        if (m_column == thisLine->length()) {
+        if (m_column >= thisLine->length()) {
           // Have come to the end of a line
           if (line() >= doc()->lines() - 1)
             // Have come to the end of the document
[prev in list] [next in list] [prev in thread] [next in thread] 

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