diff --git a/docs/changelog.rst b/docs/changelog.rst index ef039d9dc..12e418ada 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -127,6 +127,8 @@ Detailed list of changes - Fix a crash when calling :code:`Screen.hyperlink_at()` with coordinates outside the screen, such as from a watcher (:iss:`10890`) +- Fix animated images stopping when switching to a tab without animations and then back (:iss:`10894`) + 0.51.0 [2026-11-18] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/state.c b/kitty/state.c index b7bca2916..158613c57 100644 --- a/kitty/state.c +++ b/kitty/state.c @@ -666,6 +666,10 @@ set_active_tab(id_type os_window_id, unsigned int idx) { WITH_OS_WINDOW(os_window_id) os_window->active_tab = idx; os_window->needs_render = true; + // Animations are only scanned in windows of the active tab, so if the + // previously active tab had none, scanning stopped and must be restarted + // for the newly active tab, see https://github.com/kovidgoyal/kitty/issues/10894 + global_state.check_for_active_animated_images = true; update_os_window_visibility_reports(os_window); END_WITH_OS_WINDOW }