Fix cursor blinking

This commit is contained in:
Antonio Scandurra 2021-03-25 17:39:16 +01:00
parent 596fc47a68
commit e44ea6b379

View File

@ -1058,13 +1058,14 @@ impl BufferView {
ctx.notify();
let epoch = self.next_blink_epoch();
let _ = ctx.spawn(
ctx.spawn(
async move {
Timer::after(CURSOR_BLINK_INTERVAL).await;
epoch
},
Self::resume_cursor_blinking,
);
)
.detach();
}
fn resume_cursor_blinking(&mut self, epoch: usize, ctx: &mut ViewContext<Self>) {
@ -1080,13 +1081,14 @@ impl BufferView {
ctx.notify();
let epoch = self.next_blink_epoch();
let _ = ctx.spawn(
ctx.spawn(
async move {
Timer::after(CURSOR_BLINK_INTERVAL).await;
epoch
},
Self::blink_cursors,
);
)
.detach();
}
}