Bug 156126 - Text selection when searching not properly updating selection start/end position
Summary: Text selection when searching not properly updating selection start/end position
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE RPMs Linux
: HI normal (vote)
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-18 18:27 UTC by Maciej Pilichowski
Modified: 2011-08-08 11:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Pilichowski 2008-01-18 18:27:02 UTC
Version:            (using KDE 3.5.8)
Installed from:    SuSE RPMs

This is continuation of this report:
https://bugs.kde.org/show_bug.cgi?id=122101

which unfortunately was closed and forgotten.

The problem is:
"
When searching for a text string (in normal/non-block mode), and when that string is matched in the current document, the match is selected. This selection, however, appears to have invalid start/end positions - even though the match string looks to be properly highlighted and copy/cut works as expected with the string, there is a problem when trying to extend or contract the selection using shift + cursor keys. 
 
 When trying to extend the selection using these keys the start of the selection block jumps from the start of the current match string to what seems to be the end of the prior selection block, meaning your current selection includes all the text between the previous match selection end and the new match selection end. 
 
 The "previous selection end" to which the start position jumps only seems to change when you move the cursor using the arrow keys, without holding shift - if you do hold shift and modify the selection block using the arrow keys, hit find again, modify the selection, etc..., the start of the selection block always jumps to the same place. 
"
Comment 1 Christoph Cullmann 2010-02-16 18:15:42 UTC
Redirect bug to Bernhard ;)
Comment 2 Dominik Haumann 2011-08-08 09:55:18 UTC
This is due to bug #213693. The git revision is 0ee38b230622f0e65eaaa900abfa9c9ef0291ff7 and the specific wrong code is KateViewInternal::viewSelectionChanged(). It's wrong to always invalidate the anchor.
Comment 3 Dominik Haumann 2011-08-08 11:55:46 UTC
Git commit 6e93d53c7feacc618d53ca5a79417c08a439c38c by Dominik Haumann.
Committed on 08/08/2011 at 13:54.
Pushed by dhaumann into branch 'master'.

fix selection after search

BUG: 156126
CCBUG: 213693

M  +10   -7    part/view/kateviewinternal.cpp

http://commits.kde.org/kate/6e93d53c7feacc618d53ca5a79417c08a439c38c
Comment 4 Dominik Haumann 2011-08-08 11:56:45 UTC
Git commit 202f5d7fb875bdac41fc778a5f3444db950513ba by Dominik Haumann.
Committed on 08/08/2011 at 13:54.
Pushed by dhaumann into branch 'KDE/4.7'.

fix selection after search

BUG: 156126
CCBUG: 213693

M  +10   -7    part/view/kateviewinternal.cpp

http://commits.kde.org/kate/202f5d7fb875bdac41fc778a5f3444db950513ba