Rename editor::Event::Edited to editor::Event::BufferEdited

This is to distinguish it from a new event we're about to add which
represent edits originating from that specific editor.
This commit is contained in:
Antonio Scandurra 2022-03-24 08:55:46 +01:00
parent 864bede8a2
commit a739c362d9
11 changed files with 26 additions and 38 deletions

View file

@ -360,7 +360,7 @@ impl SearchBar {
cx: &mut ViewContext<Self>,
) {
match event {
editor::Event::Edited { .. } => {
editor::Event::BufferEdited { .. } => {
self.query_contains_error = false;
self.clear_matches(cx);
self.update_matches(true, cx);
@ -377,7 +377,7 @@ impl SearchBar {
cx: &mut ViewContext<Self>,
) {
match event {
editor::Event::Edited { .. } => self.update_matches(false, cx),
editor::Event::BufferEdited { .. } => self.update_matches(false, cx),
editor::Event::SelectionsChanged { .. } => self.update_match_index(cx),
_ => {}
}