agent: Fix cmd-f not working when buffer is open (#60750)
Turns out I only tested it with all tabs closed, the keybinding would only work when all tabs were closed and you focused the agent panel. If a file was opened in the center pane, cmd-f would open a search in that file instead of searching in the agent panel, even if the thread view as focused. Closes #60686 Release Notes: - agent: Fixed an issue where cmd-f would not work if file is open in center pane
This commit is contained in:
1 parent
79b4ffe356
commit
11356984fb
4 files changed
+7
-22
No files matched your search
@@ -298,13 +298,6 @@
|
||||
"alt-r": "search::ToggleRegex",
|
||||
},
|
||||
},
|
||||
{
|
||||
"context": "AgentTerminalThread",
|
||||
"use_key_equivalents": true,
|
||||
"bindings": {
|
||||
"ctrl-f": "agent::ToggleSearch",
|
||||
},
|
||||
},
|
||||
{
|
||||
"context": "AcpThreadSearchBar",
|
||||
"use_key_equivalents": true,
|
||||
@@ -326,6 +319,7 @@
|
||||
"context": "AcpThread > Editor",
|
||||
"use_key_equivalents": true,
|
||||
"bindings": {
|
||||
"ctrl-f": "agent::ToggleSearch",
|
||||
"ctrl-alt-pageup": "agent::ScrollOutputPageUp",
|
||||
"ctrl-alt-pagedown": "agent::ScrollOutputPageDown",
|
||||
"ctrl-alt-home": "agent::ScrollOutputToTop",
|
||||
@@ -1271,7 +1265,9 @@
|
||||
},
|
||||
{
|
||||
"context": "AgentPanel > Terminal",
|
||||
"use_key_equivalents": true,
|
||||
"bindings": {
|
||||
"ctrl-f": "agent::ToggleSearch",
|
||||
"ctrl-n": "agent::NewThread",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -336,13 +336,6 @@
|
||||
"alt-cmd-x": "search::ToggleRegex",
|
||||
},
|
||||
},
|
||||
{
|
||||
"context": "AgentTerminalThread",
|
||||
"use_key_equivalents": true,
|
||||
"bindings": {
|
||||
"cmd-f": "agent::ToggleSearch",
|
||||
},
|
||||
},
|
||||
{
|
||||
"context": "AcpThreadSearchBar",
|
||||
"use_key_equivalents": true,
|
||||
@@ -364,6 +357,7 @@
|
||||
"context": "AcpThread > Editor",
|
||||
"use_key_equivalents": true,
|
||||
"bindings": {
|
||||
"cmd-f": "agent::ToggleSearch",
|
||||
"ctrl-pageup": "agent::ScrollOutputPageUp",
|
||||
"ctrl-pagedown": "agent::ScrollOutputPageDown",
|
||||
"ctrl-home": "agent::ScrollOutputToTop",
|
||||
@@ -1341,6 +1335,7 @@
|
||||
"context": "AgentPanel > Terminal",
|
||||
"use_key_equivalents": true,
|
||||
"bindings": {
|
||||
"cmd-f": "agent::ToggleSearch",
|
||||
"cmd-n": "agent::NewThread",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -299,13 +299,6 @@
|
||||
"alt-r": "search::ToggleRegex",
|
||||
},
|
||||
},
|
||||
{
|
||||
"context": "AgentTerminalThread",
|
||||
"use_key_equivalents": true,
|
||||
"bindings": {
|
||||
"ctrl-f": "agent::ToggleSearch",
|
||||
},
|
||||
},
|
||||
{
|
||||
"context": "AcpThreadSearchBar",
|
||||
"use_key_equivalents": true,
|
||||
@@ -327,6 +320,7 @@
|
||||
"context": "AcpThread > Editor",
|
||||
"use_key_equivalents": true,
|
||||
"bindings": {
|
||||
"ctrl-f": "agent::ToggleSearch",
|
||||
"ctrl-alt-pageup": "agent::ScrollOutputPageUp",
|
||||
"ctrl-alt-pagedown": "agent::ScrollOutputPageDown",
|
||||
"ctrl-alt-home": "agent::ScrollOutputToTop",
|
||||
@@ -1285,6 +1279,7 @@
|
||||
"context": "AgentPanel > Terminal",
|
||||
"use_key_equivalents": true,
|
||||
"bindings": {
|
||||
"ctrl-f": "agent::ToggleSearch",
|
||||
"ctrl-n": "agent::NewThread",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -6485,7 +6485,6 @@ impl Render for AgentPanel {
|
||||
.and_then(|terminal_id| self.terminals.get(&terminal_id))
|
||||
.and_then(|terminal| terminal.search_bar.clone());
|
||||
let terminal_content = v_flex()
|
||||
.key_context("AgentTerminalThread")
|
||||
.size_full()
|
||||
.when_some(search_bar, |this, search_bar| {
|
||||
this.when(!search_bar.read(cx).is_dismissed(), |this| {
|
||||
|
||||
Reference in new issue
Block a user