Wire up buffer search toggle for EditorPane

This commit is contained in:
Marshall Bowers 2023-10-13 17:14:09 -04:00
parent e477fa7a93
commit c70f220db3
4 changed files with 94 additions and 64 deletions

View file

@ -12,8 +12,8 @@ use std::sync::Arc;
use clap::Parser;
use gpui3::{
div, px, size, view, AnyView, Bounds, Context, Element, ViewContext, WindowBounds,
WindowOptions,
div, px, size, view, AnyView, BorrowAppContext, Bounds, Context, Element, ViewContext,
WindowBounds, WindowOptions,
};
use log::LevelFilter;
use simplelog::SimpleLogger;
@ -68,7 +68,11 @@ fn main() {
},
move |cx| {
view(
cx.entity(|cx| StoryWrapper::new(selector.story(cx), theme)),
cx.entity(|cx| {
cx.with_global(theme.clone(), |cx| {
StoryWrapper::new(selector.story(cx), theme)
})
}),
StoryWrapper::render,
)
},