Require a build_style callback to be passed to Editor on construction

We're going to use this to control the text style, so it really doesn't make sense to allow an editor to be constructed without it.
This commit is contained in:
Nathan Sobo
2021-09-16 13:20:12 -06:00
parent ad9712db70
commit 606aa148a6
5 changed files with 87 additions and 58 deletions
+3 -1
View File
@@ -1121,7 +1121,9 @@ mod tests {
.unwrap();
// Create a selection set as client B and see that selection set as client A.
let editor_b = cx_b.add_view(window_b, |cx| Editor::for_buffer(buffer_b, settings, cx));
let editor_b = cx_b.add_view(window_b, |cx| {
Editor::for_buffer(buffer_b, settings, |_| Default::default(), cx)
});
buffer_a
.condition(&cx_a, |buffer, _| buffer.selection_sets().count() == 1)
.await;