Emit an Edited
event when ending, undoing or redoing a transaction
This commit is contained in:
parent
a739c362d9
commit
87981bb2ab
2 changed files with 6 additions and 1 deletions
|
@ -3364,6 +3364,7 @@ impl Editor {
|
|||
self.set_selections(selections, None, true, cx);
|
||||
}
|
||||
self.request_autoscroll(Autoscroll::Fit, cx);
|
||||
cx.emit(Event::Edited);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3373,6 +3374,7 @@ impl Editor {
|
|||
self.set_selections(selections, None, true, cx);
|
||||
}
|
||||
self.request_autoscroll(Autoscroll::Fit, cx);
|
||||
cx.emit(Event::Edited);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5148,6 +5150,8 @@ impl Editor {
|
|||
} else {
|
||||
log::error!("unexpectedly ended a transaction that wasn't started by this editor");
|
||||
}
|
||||
|
||||
cx.emit(Event::Edited);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5657,6 +5661,7 @@ fn compute_scroll_position(
|
|||
pub enum Event {
|
||||
Activate,
|
||||
BufferEdited,
|
||||
Edited,
|
||||
Blurred,
|
||||
Dirtied,
|
||||
Saved,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue