Bug 154217 - When replacing text while the replace dialog is open the selected text is not transfered into the find field.
Summary: When replacing text while the replace dialog is open the selected text is not...
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
: 156581 (view as bug list)
Depends on:
Reported: 2007-12-17 11:16 UTC by Fabian
Modified: 2008-05-09 01:12 UTC (History)
1 user (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Fabian 2007-12-17 11:16:53 UTC
Version:            (using KDE KDE 3.97.0)
Installed from:    SuSE RPMs
OS:                Linux

When some text is selected and you hit "ctrl + r" the replace dialog opens with the selected text in the find field.

If you select some other text and hit "ctrl + r" again, the find field is only selected, but not prefilled with the new selected text. When the dialog is closed before doing the second replace it works. Same behavior applies to Edit->Replace.

I think every time one hits "ctrl + r" and text is selected the selected text should be prefilled into the find field.
Comment 1 FiNeX 2008-01-26 10:39:51 UTC
*** Bug 156581 has been marked as a duplicate of this bug. ***
Comment 2 Sebastian Pipping 2008-01-28 23:00:03 UTC
This is by intention. I'm not sure if it is a good idea to change this. I'dlike to hear more opinions on this one.
Comment 3 Marcel Partap 2008-01-28 23:38:57 UTC
well I'm not sure you'd like to hear more opinions by me, but imho you press CTRL+F to start a new search. If CTRL+F searches for the selected text if the search bar is not displayed, why should it stop doing that if the bar is already opened? That way CTRL+F does nothing once the search bar is open, not even hide it. Way better to update the search phrase 2 a different selected text imho.
Comment 4 Andreas Pakulat 2008-01-28 23:58:42 UTC
Same thing for find.

And IMHO it would be better to feed the current selection into the find dialog and provide a history combo that contains the last x searches.
Comment 5 Sebastian Pipping 2008-01-29 03:18:38 UTC
I'm not sure what you mean. What would you change about the current history combo box?
Comment 6 Andreas Pakulat 2008-01-29 07:25:39 UTC
Which history combo box? I don't see one in the find dialog of kwrite/KDE4. Am I missing something?
Comment 7 Sebastian Pipping 2008-01-29 07:36:31 UTC
hm, both pattern and replacement have history combos shared among all views. this is how it should look like:

does your setup differ?
Comment 8 FiNeX 2008-01-29 09:17:59 UTC
I Agree with the wish.
Comment 9 Andreas Pakulat 2008-01-29 09:36:35 UTC
I don't have kwrite in front of me right now, but the "simple" search didn't have a combobox when I tried it yesterday.

IMHO the combobox as well as the "use current selection to prefill find field" should be the same between the simple and the power search interface.
Comment 10 Sebastian Pipping 2008-01-30 00:01:46 UTC
i didn't think of the incremental bar, sorry. i decided against search history for the incremental bar in the past, mainly because you seldom type full words there and the question comes up when to actually add a "word" to the history.
Comment 11 Jakob Petsovits 2008-05-09 01:12:07 UTC
SVN commit 805629 by jpetso:

Refine the logic of onMutateIncremental() and
onMutatePower() so that Ctrl-F and Ctrl-R always
uses the selected text as search pattern.

If no text is selected (or a multi-line snippet that
can't be assigned to the find/replace text edit) then
the existing search pattern is used, as was always
the case until now.

BUG: 154217

 M  +55 -52    katesearchbar.cpp  

WebSVN link: http://websvn.kde.org/?view=rev&revision=805629