Add View::update which provides a ViewContext

This commit is contained in:
Nathan Sobo 2023-10-26 19:41:42 +02:00
parent 8e3314e680
commit a1c3826858
17 changed files with 403 additions and 247 deletions

View file

@ -1,7 +1,7 @@
use std::path::PathBuf;
use std::str::FromStr;
use gpui2::WindowContext;
use gpui2::{AppContext, WindowContext};
use rand::Rng;
use theme2::Theme;
@ -781,7 +781,7 @@ pub fn hello_world_rust_buffer_rows(theme: &Theme) -> Vec<BufferRow> {
]
}
pub fn hello_world_rust_editor_with_status_example(cx: &mut WindowContext) -> EditorPane {
pub fn hello_world_rust_editor_with_status_example(cx: &mut AppContext) -> EditorPane {
let theme = theme(cx);
EditorPane::new(