Select buffer search query on follow-up cmd-f (#10745)

https://github.com/zed-industries/zed/assets/2690773/fd754cfc-aca5-4c4d-9b42-53d1c8eca0e9

Unfortunately, the tests did not work for me, as the `FocusSearch`
action handlers were never called for me.

Release Notes:

- Improved buffer search workflow: follow-up cmd-f select query string
This commit is contained in:
Kirill Bulatov 2024-04-19 01:43:33 +03:00 committed by GitHub
parent 15c4c4a308
commit 250b71fb44
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -436,6 +436,7 @@ impl BufferSearchBar {
pub fn register(registrar: &mut impl SearchActionsRegistrar) {
registrar.register_handler(ForDeployed(|this, _: &FocusSearch, cx| {
this.query_editor.focus_handle(cx).focus(cx);
this.select_query(cx);
}));
registrar.register_handler(ForDeployed(|this, action: &ToggleCaseSensitive, cx| {
if this.supported_options().case {