mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 04:21:40 +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| {
|
||||||
(
|
self.cx
|
||||||
view_id,
|
.views
|
||||||
self.cx
|
.get(&(window_id, view_id))
|
||||||
.views
|
.map(|view| (view_id, view.keymap_context(self.as_ref())))
|
||||||
.get(&(window_id, view_id))
|
|
||||||
.unwrap()
|
|
||||||
.keymap_context(self.as_ref()),
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user