mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
Align dispatch_keystroke with other uses of ancestors iterator and filter out non-existant views
This commit is contained in:
parent
f7f9b8cffe
commit
578c69476d
1 changed files with 5 additions and 9 deletions
|
@ -1479,15 +1479,11 @@ impl MutableAppContext {
|
|||
if let Some(focused_view_id) = self.focused_view_id(window_id) {
|
||||
let dispatch_path = self
|
||||
.ancestors(window_id, focused_view_id)
|
||||
.map(|view_id| {
|
||||
(
|
||||
view_id,
|
||||
self.cx
|
||||
.views
|
||||
.get(&(window_id, view_id))
|
||||
.unwrap()
|
||||
.keymap_context(self.as_ref()),
|
||||
)
|
||||
.filter_map(|view_id| {
|
||||
self.cx
|
||||
.views
|
||||
.get(&(window_id, view_id))
|
||||
.map(|view| (view_id, view.keymap_context(self.as_ref())))
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
|
Loading…
Reference in a new issue