Bug 321123

Summary: block select mode not allowing to move cursor in regions without characters
Product: [Applications] kate Reporter: Luigi Calligaris <l.calligaris>
Component: partAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: andreas_nordal_4, l.calligaris
Priority: NOR    
Version: 3.10.2   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Luigi Calligaris 2013-06-13 17:35:57 UTC
After an update from Kubuntu 12.10 to 13.04 and, as a consequence, switching to Kate version 3.10.2 I noticed a change in the behavior of block select mode: the cursor is not allowed to move in regions where there are not valid characters, preventing an efficient use of the block select feature.

If I want to block select the whole example text below, starting from top left:
<example document>
It was
It was a sunny day in Paris
It was a sunny
<\example document>
, I am prevented to do so, as the cursor does not get past the 'y' in the last "sunny" in the last line., so the second line, which is the longest one, get truncated before " day in Paris".

Filling with dummy characters the last selected line, in order to make it the longest one, is a dirty workaround:
<example document>
It was
It was a sunny day in Paris
It was a sunny                    <-now it's the longest one
<\example document>

I am not familiar with the code, but I guess that the behavior of void KateView::ensureCursorColumnValid() at part/view/kateview.cpp:1803 and its caller may have a role in the bug.

Reproducible: Always

Steps to Reproduce:
1.Enable block mode
2.Try to move cursor past the end of a line
Actual Results:  
The cursor does not move past the end

Expected Results:  
The cursor should move past the end of the line in block mode, to allow selecting blocks having inhomogenuous line lenghts
Comment 1 Andreas Nordal 2013-06-28 21:25:14 UTC
This (palindromically numbered) bug looks like a duplicate of #315316.
Comment 2 Luigi Calligaris 2013-07-04 13:08:04 UTC
Yeah, the palindrome is a cool feature :D

I confirm, it is a duplicate of bug 315316, which I overlooked when searching for an existing one.
Comment 3 Christoph Feck 2013-07-11 23:08:07 UTC
Thanks for the hint. 315316 isn't a bad number either, one less would be better, though ;)

*** This bug has been marked as a duplicate of bug 315316 ***