Restore Buffer::file field and workspace::Item trait
This commit is contained in:
@@ -324,7 +324,7 @@ mod tests {
|
||||
fn test_chars_at() {
|
||||
App::test((), |app| {
|
||||
let text = sample_text(6, 6);
|
||||
let buffer = app.add_model(|_| Buffer::new(0, text));
|
||||
let buffer = app.add_model(|ctx| Buffer::new(0, text, ctx));
|
||||
let map = app.add_model(|ctx| DisplayMap::new(buffer.clone(), 4, ctx));
|
||||
buffer
|
||||
.update(app, |buffer, ctx| {
|
||||
@@ -391,7 +391,7 @@ mod tests {
|
||||
#[test]
|
||||
fn test_max_point() {
|
||||
App::test((), |app| {
|
||||
let buffer = app.add_model(|_| Buffer::new(0, "aaa\n\t\tbbb"));
|
||||
let buffer = app.add_model(|ctx| Buffer::new(0, "aaa\n\t\tbbb", ctx));
|
||||
let map = app.add_model(|ctx| DisplayMap::new(buffer.clone(), 4, ctx));
|
||||
assert_eq!(
|
||||
map.read(app).max_point(app.as_ref()),
|
||||
|
||||
Reference in New Issue
Block a user