Remove model and view specific observe/subscribe methods
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
parent
5ecedd894d
commit
fa0739ee2e
+3
-3
@@ -324,9 +324,9 @@ impl Editor {
|
||||
) -> Self {
|
||||
let display_map =
|
||||
cx.add_model(|cx| DisplayMap::new(buffer.clone(), settings.borrow().clone(), None, cx));
|
||||
cx.observe_model(&buffer, Self::on_buffer_changed);
|
||||
cx.subscribe_to_model(&buffer, Self::on_buffer_event);
|
||||
cx.observe_model(&display_map, Self::on_display_map_changed);
|
||||
cx.observe(&buffer, Self::on_buffer_changed);
|
||||
cx.subscribe(&buffer, Self::on_buffer_event);
|
||||
cx.observe(&display_map, Self::on_display_map_changed);
|
||||
|
||||
let mut next_selection_id = 0;
|
||||
let selection_set_id = buffer.update(cx, |buffer, cx| {
|
||||
|
||||
Reference in New Issue
Block a user