feat: Improve Blink Cursor (#34)

* add cursor color to theme

* adjust
This commit is contained in:
reya
2025-05-13 13:26:02 +07:00
committed by GitHub
parent 4e24061817
commit 4f066b7c00
3 changed files with 14 additions and 6 deletions

View File

@@ -50,8 +50,10 @@ impl BlinkCursor {
// Schedule the next blink
let epoch = self.next_epoch();
cx.spawn(async move |this, cx| {
Timer::after(INTERVAL).await;
if let Some(this) = this.upgrade() {
this.update(cx, |this, cx| this.blink(epoch, cx)).ok();
}
@@ -71,6 +73,7 @@ impl BlinkCursor {
// delay 500ms to start the blinking
let epoch = self.next_epoch();
cx.spawn(async move |this, cx| {
Timer::after(PAUSE_DELAY).await;