[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 18:32:32
Message-ID: 1177525952.622262.10186.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 658024 by mwoehlke:
Restore selStartCached for Word selection mode after viewSelectionChanged nukes it. \
Symptom reported by Leo Savernik (describing a different bug that caused this one to \
manifest in the case he reported).
M +10 -0 kateviewinternal.cpp
--- branches/KDE/3.5/kdelibs/kate/part/kateviewinternal.cpp #658023:658024
@@ -2050,6 +2050,16 @@
{
case Word:
{
+ // Restore selStartCached if needed. It gets nuked by
+ // viewSelectionChanged if we drag the selection into non-existence,
+ // which can legitimately happen if a shift+DC selection is unable to
+ // set a "proper" (i.e. non-empty) cached selection, e.g. because the
+ // start was on something that isn't a word. Word select mode relies
+ // on the cached selection being set properly, even if it is empty
+ // (i.e. selStartCached == selEndCached).
+ if ( selStartCached.line() == -1 )
+ selStartCached = selEndCached;
+
int c;
if ( newCursor > selEndCached )
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic