Bug 111581

Summary: kmail composer, find and replace: "End of document reached, continue", endless loop
Product: [Applications] kmail Reporter: Daniel Franke <franke.daniel>
Component: composerAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: dominik.tritscher, jtamate
Priority: NOR Keywords: triaged
Version: 1.8.2   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Daniel Franke 2005-08-26 20:25:55 UTC
Version:           1.8.2 (using KDE 3.4.2, Gentoo)
Compiler:          gcc version 3.3.5-20050130 (Gentoo 3.3.5.20050130-r1, ssp-3.3.5.20050130-1, pie-8.7.7.1)
OS:                Linux (i686) release 2.6.11.11

KMail, composer: Edit -> Replace:

Say, replace "foo" by "bar", press "Replace All". 

Eventually a dialog will popup that reads:
"End of document reached. Continue from beginning? [Yes] [No]"
Press "Yes". 
Enventually, a dialog will popup that reads:
"End of document reached. Continue from beginning? [Yes] [No]"
Press "Yes" ...
... you get my drift.

The usual behaviour is to stop when hitting the starting place, i.e. where the cursor was when opening the Replace-dialog.
Comment 1 Dave Rowe 2005-08-29 00:50:59 UTC
Is this really a bug?  Couldn't the user simply press "No" and be done with it?
Comment 2 Daniel Franke 2005-08-29 18:36:03 UTC
Surely can and has to. Please have a look at kate, there, after wrapping around, another dialog appears that tells how often the original string was replaced. That's not necessary to do in composer, but I'd rather expect the replace-dialog to disappear completely after wrapping at the end of the mail, but to request another confirmation and another since "yes" is the default action while hitting [enter]. A simple solution would be to change the default button to "no" the second time, then, hitting [enter] twice will replace all occurences of the search string AND the dialog will disappear without further user interaction.
Comment 3 Jaime Torres 2008-09-18 11:04:48 UTC
The replace in kmail 1.10.1 only does one pass to the document.
If the from cursor is selected, it ends at the end of the document (without starting from the begining), and if the backwars is also selected, it ends at the begining.
Comment 4 Dominik Tritscher 2008-09-20 01:13:55 UTC
I can confirm the behaviour Jaime described, so I consider this as fixed.