From 5e8e141fb56b3a35e3025225c5855c0e6098bd75 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 10 May 2018 07:31:53 +0530 Subject: [PATCH] Fix cursor_stop_blinking_after=0 not working. Fixes #530 --- kitty/child-monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/child-monitor.c b/kitty/child-monitor.c index df48857c5..ea7e802cb 100644 --- a/kitty/child-monitor.c +++ b/kitty/child-monitor.c @@ -502,7 +502,7 @@ collect_cursor_info(CursorRenderInfo *ans, Window *w, double now, OSWindow *os_w ans->is_visible = false; if (rd->screen->scrolled_by || !screen_is_cursor_visible(rd->screen)) return; double time_since_start_blink = now - os_window->cursor_blink_zero_time; - bool cursor_blinking = OPT(cursor_blink_interval) > 0 && os_window->is_focused && time_since_start_blink <= OPT(cursor_stop_blinking_after) ? true : false; + bool cursor_blinking = OPT(cursor_blink_interval) > 0 && os_window->is_focused && (OPT(cursor_stop_blinking_after) == 0 || time_since_start_blink <= OPT(cursor_stop_blinking_after)); bool do_draw_cursor = true; if (cursor_blinking) { int t = (int)(time_since_start_blink * 1000);