Bug 286887 - [PATCH] KDevelop and Kate editor freeze in block select mode when you try to select words outside from text with SHIFT+CTRL+CURSOR_LEFT
Summary: [PATCH] KDevelop and Kate editor freeze in block select mode when you try to ...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: part (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: VHI crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 296986 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-17 23:00 UTC by meah
Modified: 2012-03-29 06:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.2


Attachments
Proposed fix (508 bytes, text/plain)
2012-03-19 11:13 UTC, Rob Hulswit
Details

Note You need to log in before you can comment on or make changes to this bug.
Description meah 2011-11-17 23:00:35 UTC
Version:           4.2.3 (using KDE 4.7.3) 
OS:                Linux

editor window freeze when hitting cursor jump sequences in block select mode
this was firstly happens in KDevelop whis is very annoying - i tried this also with Kate and this also happens. 



Reproducible: Always

Steps to Reproduce:
1. start kate or a new editor window 
2. type in 1234 in the text editor
3. activate block select mode (CTRL+SHIFT+b)
4. place cursor outside of the test -> move cursor two steps after 1234
5. press SHIFT+CTRL+CURSOR_LEFT -> system freezes 

Actual Results:  
editor window is unresponsable an the application consumes cpu power 

Expected Results:  
editor window should not be unresponsable ;) 

I use KDevelop under xfce. I will check this back under a native kde desktop

SHIFT+CTRL+CURSOR_RIGHT combination works fine

there was no losses of data but the system ask to recover the data - may be that some modified data could be not recovered
Comment 1 meah 2011-11-17 23:18:08 UTC
This problem also happens under a native KDE desktop

This problem doesn't exist on KDE version 4.6.5 (Fedora 14 - gnome2)
Comment 2 Rob Hulswit 2012-03-19 11:13:46 UTC
Created attachment 69730 [details]
Proposed fix

This is caused by the wrappingcursor - when going left beyond the end of the line, previousCursorPosition is called on the layout, but that does not return a changed column value. There code to prevent just this case in BoundedCursor::operator+=, but not in WrappingCursor::operator+=.
Comment 3 Dominik Haumann 2012-03-22 21:10:10 UTC
Git commit b039dac66327891665e93402b7b7ac4a1b71268a by Dominik Haumann.
Committed on 22/03/2012 at 22:08.
Pushed by dhaumann into branch 'master'.

fix crash on ctrl+shift+left / delete word left

part/tests/bug286887.* contains a unit test for this.

M  +4    -1    part/view/kateviewinternal.cpp

http://commits.kde.org/kate/b039dac66327891665e93402b7b7ac4a1b71268a
Comment 4 Dominik Haumann 2012-03-22 21:16:03 UTC
Git commit 492a1ed70be8adf101b3eb4ea1f405cb8de8331d by Dominik Haumann.
Committed on 22/03/2012 at 22:08.
Pushed by dhaumann into branch 'KDE/4.8'.

fix crash on ctrl+shift+left / delete word left

part/tests/bug286887.* contains a unit test for this.

M  +4    -1    part/view/kateviewinternal.cpp

http://commits.kde.org/kate/492a1ed70be8adf101b3eb4ea1f405cb8de8331d
Comment 5 Dominik Haumann 2012-03-29 06:42:56 UTC
*** Bug 296986 has been marked as a duplicate of this bug. ***