Bug 222389

Summary: two replaces on the same selection, try to undo last one results in undo both
Product: [Applications] kate Reporter: H.H. <cyberbeat>
Component: searchAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: abhishekworld, kwrite-bugs-null
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description H.H. 2010-01-12 15:41:18 UTC
Version:           4.3.90 (KDE 4.3.90 (KDE 4.4 RC1)) "release 210" (using 4.3.90 (KDE 4.3.90 (KDE 4.4 RC1)) "release 210", KDE:KDE4:Factory:Desktop / openSUSE_11.2)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.31.5-0.1-desktop

I used replace function (with reg. expr.) on a selection. then another replace on the same selection. I cannot undo the last replace. So I have to make the first replace always after the undo, and then the second, although I only wanted to make the second again.
Comment 1 Abhishek Patil 2010-01-12 15:47:21 UTC
I cant able to reproduce this bug, can u give some example.
Comment 2 H.H. 2010-01-12 19:07:52 UTC
ok, I hope you have kwrite-4.3.90, too:

- open kwrite
- type "abcdef"
- press CTRL + R (replace dialog)
- replace "cd" with nothing
- leave replace dialog open
- replace "be" with nothing
- press CTRL + Z (undo)

it now should read "abef", but it reads "abcdef" (original string). undo should only reverse last replace operation.
Comment 3 Abhishek Patil 2010-01-12 21:18:12 UTC
Thanks Conform form my side, I am able to reproduce this bug..
Comment 4 Dominik Haumann 2011-08-08 12:29:21 UTC
Git commit 995237a2db6e4eef6aff77a4f6e7ff5554d33040 by Dominik Haumann.
Committed on 08/08/2011 at 14:27.
Pushed by dhaumann into branch 'master'.

undo: do not merge separate replace actions

CCMAIL: bbeschow@cs.tu-berlin.de
BUG: 222389

M  +2    -0    part/document/katedocument.h
M  +5    -1    part/document/katedocument.cpp
M  +7    -0    part/search/katesearchbar.cpp

http://commits.kde.org/kate/995237a2db6e4eef6aff77a4f6e7ff5554d33040
Comment 5 Dominik Haumann 2011-08-08 12:29:45 UTC
Git commit 4056e4547049a90ef6ccbc2d972dc590f7955886 by Dominik Haumann.
Committed on 08/08/2011 at 14:27.
Pushed by dhaumann into branch 'KDE/4.7'.

undo: do not merge separate replace actions

CCMAIL: bbeschow@cs.tu-berlin.de
BUG: 222389

M  +2    -0    part/document/katedocument.h
M  +5    -1    part/document/katedocument.cpp
M  +7    -0    part/search/katesearchbar.cpp

http://commits.kde.org/kate/4056e4547049a90ef6ccbc2d972dc590f7955886