Bug 229454 - Kate block selection regressions
Summary: Kate block selection regressions
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 164413 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-04 22:19 UTC by Nicolas Bigaouette
Modified: 2010-05-09 22:45 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Bigaouette 2010-03-04 22:19:20 UTC
Version:            (using KDE 4.4.1)
Compiler:          gcc version 4.4.3 (GCC) Configured with: ../configure --prefix=/usr --enable-shared --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-threads=posix --mandir=/usr/share/man --infodir=/usr/share/info --enable-__cxa_atexit --disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu --disable-libstdcxx-pch --with-tune=generic
OS:                Linux
Installed from:    Archlinux Packages

Since KDE 4.4.0, kate block selection is broken. I cannot block-select something and delete it by pressing del or backspace anymore.

Something else:  Pasting a line of text while in block mode puts the cursor at the end of the pasted text, not at the beginning of it as was the case before.
Comment 1 Burkhard Lück 2010-03-05 13:55:42 UTC
$ kate --version
Qt: 4.6.0
KDE: 4.4.1 (KDE 4.4.1)
Kate: 3.4.1

compiled from sources

Block selection works, Archlinux problem?
Comment 2 Nicolas Bigaouette 2010-03-05 21:15:13 UTC
kate --version
Qt: 4.6.2
KDE Development Platform: 4.4.1 (KDE 4.4.1)
Kate: 3.4.1

I just tried with a clean ~/.kde4. I cannot paste a copied column. Something even weirder: I can sometimes delete a selected column, sometimes not. It seems to depend on what I select.

I think I just narrowed it down. If I select starting from the lower-left or upper right, I cannot delete. If I select starting from the upper-left or lower-right, it works: I can delete.

Same thing with copy pasting. Can you reproduce that?
Comment 3 Burkhard Lück 2010-03-05 22:22:31 UTC
(In reply to comment #2)
> kate --version
> Qt: 4.6.2
> KDE Development Platform: 4.4.1 (KDE 4.4.1)
> Kate: 3.4.1
> 
> I just tried with a clean ~/.kde4. I cannot paste a copied column. Something
> even weirder: I can sometimes delete a selected column, sometimes not. It 
> seems to depend on what I select.
> 
> I think I just narrowed it down. If I select starting from the lower-left or
> upper right, I cannot delete. 

Confirmed, konsole output is:
kate(16783)/Kate KateLayoutCache::relayoutLines: start 2147483647 before end 0

> If I select starting from the upper-left or
> lower-right, it works: I can delete.
> 
Confirmed.

> Same thing with copy pasting. Can you reproduce that?

Yes, nice catch! Thanks.
Comment 4 Pascal Létourneau 2010-03-05 22:29:13 UTC
SVN commit 1099633 by pletourn:

Fix block selection

BUG:229454


 M  +4 -8      katedocument.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1099633
Comment 5 Pascal Létourneau 2010-03-05 22:31:11 UTC
SVN commit 1099634 by pletourn:

Fix block selection

CCBUG:229454


 M  +4 -8      katedocument.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1099634
Comment 6 Burkhard Lück 2010-03-05 22:57:17 UTC
This editor and it's devels really rock!

Tank you kate guys!
Comment 7 Nicolas Bigaouette 2010-03-05 22:59:49 UTC
I'm rebuilding kdelibs right now. Will report back soon. Thanx! ;)
Comment 8 Nicolas Bigaouette 2010-03-05 23:47:28 UTC
Excellent, it seems fixed!
Thanx Pascal ;)
Comment 9 Nicolas Bigaouette 2010-03-11 19:47:26 UTC
I'd like to reopen this since not everything is fixed. They are other regressions present.

Two I see right away:
1) When pasting in block mode, the cursor ends-up on the right of the pasted text, while previously it was on the left.
2) I want to replace a column by another one. I copy the column I want, then select the one to replace, making sure the selection ends at the top of the selection. When I paste, the pasted column appears one character to the right of what it should be. For example, I want to replace the column containing "0"s:
psi_000^{n+1}
psi_100^{n+1}
psi_200^{n+1}
psi_300^{n+1}
psi_010^{n+1}
...
with a colum containing "1"s:
psi_001^{n+1}
psi_101^{n+1}
psi_201^{n+1}
psi_301^{n+1}
psi_011^{n+1}
...
Selecting the "0"s colum, the pasting another column previously copied over it ends up as:
psi_00^1{n+1}
psi_10^1{n+1}
psi_20^1{n+1}
psi_30^1{n+1}
psi_01^1{n+1}
...


Those are the one I just hit (again), there might be others...
Comment 10 Nicolas Bigaouette 2010-03-11 19:48:50 UTC
The problem 2) only appears when I select the "0"s column from the lower left and make my way up to the upper right. It does work as expected when going from lower right to upper left.
Comment 11 Nicolas Bigaouette 2010-03-11 20:06:53 UTC
3) Another one:
-Select a single word in block mode
-Copy it and paste it
-Press "ctrl+left" to go the begining of that word
-Press "down" to lower the cursor.

What it should do:
    The cursor should be one line lower and one character _left_ of the first character of the word.
What it does: 
    The cursor is actually one character to much on the left. If I paste again, the word is one character on the left then it should be.
Comment 12 Pascal Létourneau 2010-03-11 23:36:21 UTC
SVN commit 1102153 by pletourn:

Fix block selection

BUG:229454


 M  +2 -0      katedocument.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1102153
Comment 13 Pascal Létourneau 2010-03-11 23:37:54 UTC
SVN commit 1102154 by pletourn:

Fix block selection

CCBUG:229454


 M  +2 -0      katedocument.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1102154
Comment 14 Nicolas Bigaouette 2010-03-12 01:01:50 UTC
I could not reproduce 2) and 3), thanx Pascal.
But 1) is still there:
1) When pasting in block mode, the cursor ends-up on the right of the pasted
text, while previously it was on the left.

Because of this, when you paste a block and want to go one line down and paste again, you need to re-align the cursor. Previously you just had to press "down" to lower the cursor one line and it was already at the right place.
Comment 15 Nicolas Bigaouette 2010-03-23 00:19:44 UTC
Reopening since issue 1) is still present...
Comment 16 Dominik Haumann 2010-05-09 08:53:51 UTC
*** Bug 164413 has been marked as a duplicate of this bug. ***
Comment 17 Francesco Riosa 2010-05-09 22:41:17 UTC
Dominik bring my best greetings to Pascal, I've just tested the git kate version and Bug 164413 is fixed, also the whole column selection stuff seem more consistent.
Comment 18 Dominik Haumann 2010-05-09 22:45:43 UTC
Thanks a lot for testing Francesco. Will close this report then.

Nicolas: Please create a new bug report for issue 1) you are describing. This entry is getting too long such that it takes too much time to keep track of what's the real issue. Thanks!