Fix cursor blinking
This commit is contained in:
parent
596fc47a68
commit
e44ea6b379
1 changed files with 6 additions and 4 deletions
|
@ -1058,13 +1058,14 @@ impl BufferView {
|
||||||
ctx.notify();
|
ctx.notify();
|
||||||
|
|
||||||
let epoch = self.next_blink_epoch();
|
let epoch = self.next_blink_epoch();
|
||||||
let _ = ctx.spawn(
|
ctx.spawn(
|
||||||
async move {
|
async move {
|
||||||
Timer::after(CURSOR_BLINK_INTERVAL).await;
|
Timer::after(CURSOR_BLINK_INTERVAL).await;
|
||||||
epoch
|
epoch
|
||||||
},
|
},
|
||||||
Self::resume_cursor_blinking,
|
Self::resume_cursor_blinking,
|
||||||
);
|
)
|
||||||
|
.detach();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn resume_cursor_blinking(&mut self, epoch: usize, ctx: &mut ViewContext<Self>) {
|
fn resume_cursor_blinking(&mut self, epoch: usize, ctx: &mut ViewContext<Self>) {
|
||||||
|
@ -1080,13 +1081,14 @@ impl BufferView {
|
||||||
ctx.notify();
|
ctx.notify();
|
||||||
|
|
||||||
let epoch = self.next_blink_epoch();
|
let epoch = self.next_blink_epoch();
|
||||||
let _ = ctx.spawn(
|
ctx.spawn(
|
||||||
async move {
|
async move {
|
||||||
Timer::after(CURSOR_BLINK_INTERVAL).await;
|
Timer::after(CURSOR_BLINK_INTERVAL).await;
|
||||||
epoch
|
epoch
|
||||||
},
|
},
|
||||||
Self::blink_cursors,
|
Self::blink_cursors,
|
||||||
);
|
)
|
||||||
|
.detach();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue