mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 11:01: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) {
|
||||
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 New Issue
Block a user