Bug 154217

Summary: When replacing text while the replace dialog is open the selected text is not transfered into the find field.
Product: [Applications] kate Reporter: Fabian <fabian>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: mpartap
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

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
@andreas
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
@andreas
hm, both pattern and replacement have history combos shared among all views. this is how it should look like:
http://blog.hartwork.org/__images/kate_20070922_highlight_all_demo_100.png

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
@andreas
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