mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 19:02:35 +03:00
Merge pull request #2302 from zed-industries/fix-dispatch-path-panic
Align dispatch_keystroke with other uses of ancestors iterator
This commit is contained in:
commit
5a1bbb96ba
@ -1479,15 +1479,11 @@ impl MutableAppContext {
|
|||||||
if let Some(focused_view_id) = self.focused_view_id(window_id) {
|
if let Some(focused_view_id) = self.focused_view_id(window_id) {
|
||||||
let dispatch_path = self
|
let dispatch_path = self
|
||||||
.ancestors(window_id, focused_view_id)
|
.ancestors(window_id, focused_view_id)
|
||||||
.map(|view_id| {
|
.filter_map(|view_id| {
|
||||||
(
|
|
||||||
view_id,
|
|
||||||
self.cx
|
self.cx
|
||||||
.views
|
.views
|
||||||
.get(&(window_id, view_id))
|
.get(&(window_id, view_id))
|
||||||
.unwrap()
|
.map(|view| (view_id, view.keymap_context(self.as_ref())))
|
||||||
.keymap_context(self.as_ref()),
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user