Bug 397343

Summary: Search state lost when switching from one file to another
Product: [Applications] kate Reporter: Ralf Jung <post>
Component: searchAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: a.samirh78
Priority: NOR    
Version: 18.04.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Ralf Jung 2018-08-10 12:46:57 UTC
Often, I want to search one string first in one file and then in another, or replace A by B in two or three files.

Unfortunately, in Kate, when I go from one file to another, not only does it close the search bar; also when I hope it, it emptied all the fields in there. That makes it much harder than necessary to work on projects that span multiple files.

I think when I switch from one file to another, the search/replace bar at the bottom should stay open, and it should keep its state.
Comment 1 Christoph Feck 2018-09-05 01:31:20 UTC
Please enable the 'Search & Replace' plugin. You can also reassign shortcuts to make Ctrl+F use this as default.
Comment 2 Ralf Jung 2018-09-21 08:18:45 UTC
That looks promising, thanks. I don't understand why the default search bar behaves so strange now. (I think with old kate -- around Kate 4 -- the search bar still was properly synced between multiple open files.)
Comment 3 Ralf Jung 2018-10-15 08:09:53 UTC
There is a big problem with this solution: Now Ctrl-F is entirely broken in KWrite, because I changed the key bindings in Kate.

Is there a way to keep using the normal search in KWrite?
Comment 4 Ahmad Samir 2019-06-23 12:27:11 UTC
So there's the search & replace plugins which fills this use case. Closing this report; feel free to reopen if you disagree.
Comment 5 Ralf Jung 2019-06-23 12:47:17 UTC
I described above why this is not a great solution: after setting up Ctrl-F to trigger the search plugin, KWrite has no functioning search any more.
Comment 6 Ahmad Samir 2019-06-23 15:58:02 UTC
The Search & Replace plugin is only available for kate; at the same time both kate and Kwrite use katepart, so the shortcut you set for the "Find" action is going to be used in both applications.

The shortcuts can be configured to your liking.
Comment 7 Ralf Jung 2019-06-23 16:09:19 UTC
But this means it is impossible to have both Kate remember the search state of Ctrl-F across files, and Ctrl-F work in KWrite.

So either I have to use a non-standard shortcut in Kate (which is a mess, as Ctrl-F is used *everywhere*), or KWrite search is broken.