Bug 397343 - Search state lost when switching from one file to another
Summary: Search state lost when switching from one file to another
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: search (show other bugs)
Version: 18.04.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-10 12:46 UTC by Ralf Jung
Modified: 2019-06-23 16:09 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.