mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 10:59:53 +00:00
outline_panel: Fix j
and k
not working in outline panel filter (#17293)
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Some checks are pending
CI / Check formatting and spelling (push) Waiting to run
CI / (macOS) Run Clippy and tests (push) Waiting to run
CI / (Linux) Run Clippy and tests (push) Waiting to run
CI / (Windows) Run Clippy and tests (push) Waiting to run
CI / Create a macOS bundle (push) Blocked by required conditions
CI / Create a Linux bundle (push) Blocked by required conditions
CI / Create arm64 Linux bundle (push) Blocked by required conditions
Deploy Docs / Deploy Docs (push) Waiting to run
Docs / Check formatting (push) Waiting to run
Closes #17248 Release Notes: - Fixed outline panel filter not working for certain Vim bindings ([#17248](https://github.com/zed-industries/zed/issues/17248))
This commit is contained in:
parent
5b0d64890f
commit
072513f59f
4 changed files with 10 additions and 4 deletions
|
@ -521,7 +521,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "OutlinePanel",
|
"context": "OutlinePanel && not_editing",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"escape": "menu::Cancel",
|
"escape": "menu::Cancel",
|
||||||
"left": "outline_panel::CollapseSelectedEntry",
|
"left": "outline_panel::CollapseSelectedEntry",
|
||||||
|
|
|
@ -528,7 +528,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "OutlinePanel",
|
"context": "OutlinePanel && not_editing",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"escape": "menu::Cancel",
|
"escape": "menu::Cancel",
|
||||||
"left": "outline_panel::CollapseSelectedEntry",
|
"left": "outline_panel::CollapseSelectedEntry",
|
||||||
|
|
|
@ -489,7 +489,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"context": "OutlinePanel",
|
"context": "OutlinePanel && not_editing",
|
||||||
"bindings": {
|
"bindings": {
|
||||||
"j": "menu::SelectNext",
|
"j": "menu::SelectNext",
|
||||||
"k": "menu::SelectPrev",
|
"k": "menu::SelectPrev",
|
||||||
|
|
|
@ -722,10 +722,16 @@ impl OutlinePanel {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn dispatch_context(&self, _: &ViewContext<Self>) -> KeyContext {
|
fn dispatch_context(&self, cx: &ViewContext<Self>) -> KeyContext {
|
||||||
let mut dispatch_context = KeyContext::new_with_defaults();
|
let mut dispatch_context = KeyContext::new_with_defaults();
|
||||||
dispatch_context.add("OutlinePanel");
|
dispatch_context.add("OutlinePanel");
|
||||||
dispatch_context.add("menu");
|
dispatch_context.add("menu");
|
||||||
|
let identifier = if self.filter_editor.focus_handle(cx).is_focused(cx) {
|
||||||
|
"editing"
|
||||||
|
} else {
|
||||||
|
"not_editing"
|
||||||
|
};
|
||||||
|
dispatch_context.add(identifier);
|
||||||
dispatch_context
|
dispatch_context
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue