Bug 242723 - Pasting over certain parentheses-enclosed text moves end parenthesis to before pasted selection
Summary: Pasting over certain parentheses-enclosed text moves end parenthesis to befor...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Unclassified
Component: part (show other bugs)
Version: unspecified
Platform: Ubuntu Packages Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 266710 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-24 21:31 UTC by John R. Chase
Modified: 2011-08-11 14:17 UTC (History)
1 user (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 John R. Chase 2010-06-24 21:31:55 UTC
Version:           unspecified (using KDE 4.4.2) 
OS:                Linux

When I select a portion of comma-separated arguments within parentheses:

blah ( int a,
       int b,
       int c )

for example if I select from the start of "int b" to the end of "int c", then do ctrl-c , ctrl_v to copy & paste in place, the end parenthesis moves to a position before the selected text portion:

blah ( int a,
 )     int b,
       int c


Reproducible: Always

Steps to Reproduce:
Open kate, and in the empty document, paste:

blah ( int a,
       int b,
       int c )

Then select from the beginning character of "int b" to the end character of "int c". Then do ^c followed by ^v.

Actual Results:  
The text becomes:

blah ( int a,
 )     int b,
       int c


Expected Results:  
I expected the text to remain unchanged.
Comment 1 Dominik Haumann 2010-06-24 22:23:56 UTC
Settings > Configure Kate > Editor > Editing > Misc: [ ] Remove trailing spaces
Is that activated? If you deactivate it, do you still have the bug?
Comment 2 Dominik Haumann 2010-06-24 22:25:24 UTC
True, can reproduce. It's indeed the remove-trailing-spaces option.
Comment 3 Dominik Haumann 2011-08-08 08:29:37 UTC
Git commit 494afe2dacbe069797ac72213a08983deaee8895 by Dominik Haumann.
Committed on 08/08/2011 at 10:28.
Pushed by dhaumann into branch 'master'.

do not remove-trailing-spaces during paste

BUG: 242723

M  +1    -1    part/document/katedocument.cpp

http://commits.kde.org/kate/494afe2dacbe069797ac72213a08983deaee8895
Comment 4 Dominik Haumann 2011-08-08 08:30:39 UTC
Git commit f530cee6729e7a621e02de783d9e0b97a762ddf4 by Dominik Haumann.
Committed on 08/08/2011 at 10:29.
Pushed by dhaumann into branch 'master'.

add unit test for bug 242723

CCBUG: 242723

A  +70   -0    part/tests/bug242723_test.cpp     [License: LGPL (v2+)]
M  +11   -0    part/tests/CMakeLists.txt
A  +37   -0    part/tests/bug242723_test.h     [License: LGPL (v2+)]

http://commits.kde.org/kate/f530cee6729e7a621e02de783d9e0b97a762ddf4
Comment 5 Dominik Haumann 2011-08-08 08:34:25 UTC
Git commit f40c79cb1d54109439322469eaf080a5630d8dd9 by Dominik Haumann.
Committed on 08/08/2011 at 10:28.
Pushed by dhaumann into branch 'KDE/4.7'.

do not remove-trailing-spaces during paste

BUG: 242723

M  +1    -1    part/document/katedocument.cpp

http://commits.kde.org/kate/f40c79cb1d54109439322469eaf080a5630d8dd9
Comment 6 Dominik Haumann 2011-08-11 14:17:16 UTC
*** Bug 266710 has been marked as a duplicate of this bug. ***