From 57e23bd4e3ced276611e6fb13396d0546f613b6f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 27 Apr 2022 20:37:23 +0530 Subject: [PATCH] Handle zero blink time correctly --- kitty/rc/send_text.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kitty/rc/send_text.py b/kitty/rc/send_text.py index ab50ee3cf..ca276412a 100644 --- a/kitty/rc/send_text.py +++ b/kitty/rc/send_text.py @@ -190,6 +190,7 @@ Do not send text to the active window, even if it is one of the matched windows. remove_timer(s.timer_id) s.timer_id = 0 return s + blink_time = 15 if not get_options().cursor_stop_blinking_after else max(3, get_options().cursor_stop_blinking_after) if session == 'end': s = create_or_update_session() @@ -201,14 +202,14 @@ Do not send text to the active window, even if it is one of the matched windows. s = create_or_update_session() if window is not None: window.actions_on_close.append(partial(clear_unfocused_cursors, sid)) - s.timer_id = add_timer(partial(clear_unfocused_cursors, sid), get_options().cursor_stop_blinking_after, False) + s.timer_id = add_timer(partial(clear_unfocused_cursors, sid), blink_time, False) for w in actual_windows: w.screen.render_unfocused_cursor = 1 s.window_ids.add(w.id) else: if sid: s = create_or_update_session() - s.timer_id = add_timer(partial(clear_unfocused_cursors, sid), get_options().cursor_stop_blinking_after, False) + s.timer_id = add_timer(partial(clear_unfocused_cursors, sid), blink_time, False) for w in actual_windows: if sid: w.screen.render_unfocused_cursor = 1