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

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/kate/part
From:       Matthew Woehlke <mw_triad () users ! sourceforge ! net>
Date:       2007-04-25 17:44:26
Message-ID: 1177523066.775819.4156.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 658010 by mwoehlke:

Fix initial word selection in shift+DC selection code. Thanks to Leo Savernik for \
pointing out this issue.


 M  +4 -5      kateviewinternal.cpp  


--- branches/KDE/3.5/kdelibs/kate/part/kateviewinternal.cpp #658009:658010
@@ -2808,17 +2808,16 @@
         KateTextLine::Ptr l = m_doc->kateTextLine( selectAnchor.line() );
 
         ce = selectAnchor.col();
-        if ( ce > 0 && m_doc->highlight()->isInWord( l->getChar( ce-1 ) ) ) {
+        if ( ce > 0 && m_doc->highlight()->isInWord( l->getChar( ce ) ) ) {
           for (; ce < l->length(); ce++ )
             if ( !m_doc->highlight()->isInWord( l->getChar( ce ) ) )
               break;
         }
 
-        cs = selectAnchor.col();
+        cs = selectAnchor.col() - 1;
         if ( cs < m_doc->textLine( selectAnchor.line() ).length()
-              && m_doc->highlight()->isInWord( l->getChar( cs ) )
-              && m_doc->highlight()->isInWord( l->getChar( cs-1 ) ) ) {
-          for ( cs -= 2; cs >= 0; cs-- )
+              && m_doc->highlight()->isInWord( l->getChar( cs ) ) ) {
+          for ( cs--; cs >= 0; cs-- )
             if ( !m_doc->highlight()->isInWord( l->getChar( cs ) ) )
               break;
         }


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

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