Event dispatch moved to MutableAppContext. No longer dispatches from presenter. Not currently handling key presses properly
This commit is contained in:
parent
c303c4e8f9
commit
4271eb3624
14 changed files with 392 additions and 336 deletions
|
@ -7099,10 +7099,10 @@ mod tests {
|
|||
fn test_navigation_history(cx: &mut gpui::MutableAppContext) {
|
||||
cx.set_global(Settings::test(cx));
|
||||
use workspace::Item;
|
||||
let pane = cx.add_view(Default::default(), |cx| Pane::new(cx));
|
||||
let (_, pane) = cx.add_window(Default::default(), |cx| Pane::new(cx));
|
||||
let buffer = MultiBuffer::build_simple(&sample_text(300, 5, 'a'), cx);
|
||||
|
||||
cx.add_window(Default::default(), |cx| {
|
||||
cx.add_view(&pane, |cx| {
|
||||
let mut editor = build_editor(buffer.clone(), cx);
|
||||
let handle = cx.handle();
|
||||
editor.set_nav_history(Some(pane.read(cx).nav_history_for_item(&handle)));
|
||||
|
|
|
@ -54,8 +54,8 @@ impl FollowableItem for Editor {
|
|||
})
|
||||
})
|
||||
.unwrap_or_else(|| {
|
||||
cx.add_view(pane.window_id(), |cx| {
|
||||
Editor::for_buffer(buffer, Some(project), cx)
|
||||
pane.update(&mut cx, |_, cx| {
|
||||
cx.add_view(|cx| Editor::for_buffer(buffer, Some(project), cx))
|
||||
})
|
||||
});
|
||||
editor.update(&mut cx, |editor, cx| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue