Remove ViewContext::dispatch_any_action
This commit is contained in:
parent
029538fe21
commit
d815fc88ae
11 changed files with 197 additions and 202 deletions
|
@ -3199,11 +3199,13 @@ impl Editor {
|
|||
.with_cursor_style(CursorStyle::PointingHand)
|
||||
.with_padding(Padding::uniform(3.))
|
||||
.on_click(MouseButton::Left, {
|
||||
move |_, _, cx| {
|
||||
cx.dispatch_any_action(match fold_status {
|
||||
FoldStatus::Folded => Box::new(UnfoldAt { buffer_row }),
|
||||
FoldStatus::Foldable => Box::new(FoldAt { buffer_row }),
|
||||
});
|
||||
move |_, editor, cx| match fold_status {
|
||||
FoldStatus::Folded => {
|
||||
editor.unfold_at(&UnfoldAt { buffer_row }, cx);
|
||||
}
|
||||
FoldStatus::Foldable => {
|
||||
editor.fold_at(&FoldAt { buffer_row }, cx);
|
||||
}
|
||||
}
|
||||
})
|
||||
.into_any()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue