From a7480370a4778063c96cedfbaa9fb9404a4c3ffd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 3 Mar 2026 13:37:14 +0530 Subject: [PATCH] Cleanup previous PR Fixes #9587 --- docs/changelog.rst | 2 ++ kitty/child-monitor.c | 7 +------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 679e0bc0d..40c804e5d 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -256,6 +256,8 @@ Detailed list of changes - macOS: Fix flickering during OS Window resize (:disc:`9582`) +- Cursor trail: Show a cursor trail when switching tabs (:pull:`9588`) + 0.45.0 [2025-12-24] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/child-monitor.c b/kitty/child-monitor.c index 0a6daae9b..f41d46591 100644 --- a/kitty/child-monitor.c +++ b/kitty/child-monitor.c @@ -770,12 +770,7 @@ prepare_to_render_os_window(OSWindow *os_window, monotonic_t now, unsigned int * *active_window_bg = window_bg; if (OPT(cursor_trail)) { if (os_window->last_active_tab != os_window->active_tab && os_window->last_active_tab < os_window->num_tabs) { - CursorTrail *prev = &os_window->tabs[os_window->last_active_tab].cursor_trail; - static const int ci_x[] = {1, 1, 0, 0}, ci_y[] = {0, 1, 1, 0}; - for (int ci = 0; ci < 4; ci++) { - tab->cursor_trail.corner_x[ci] = prev->cursor_edge_x[ci_x[ci]]; - tab->cursor_trail.corner_y[ci] = prev->cursor_edge_y[ci_y[ci]]; - } + tab->cursor_trail = os_window->tabs[os_window->last_active_tab].cursor_trail; tab->cursor_trail.needs_render = true; tab->cursor_trail.updated_at = now; os_window->cursor_blink_zero_time = now;