From df17142ea4fdaa31a54015b7baab6a451a593433 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 6 Jan 2026 08:37:24 +0530 Subject: [PATCH] Fix #9355 --- docs/changelog.rst | 3 +++ kitty/layout/vertical.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index a2cef45d2..9aa982573 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -171,6 +171,9 @@ Detailed list of changes - ncurses: Fix ncurses not using dim because it is missing from the sgr property in terminfo even though it is present in the dim property. +- Fix a regression in the previous release that caused moving between neighbors + in the vertical and horizontal layouts to go in the opposite direction (:iss:`9355`) + 0.45.0 [2025-12-24] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/layout/vertical.py b/kitty/layout/vertical.py index 000963acc..c4fdeb416 100644 --- a/kitty/layout/vertical.py +++ b/kitty/layout/vertical.py @@ -129,8 +129,8 @@ class Vertical(Layout): idx = groups.index(wg) lg = len(groups) if lg > 1: - before = [groups[(idx - 1 + lg) % lg].id] - after = [groups[(idx + 1) % lg].id] + after = [groups[(idx - 1 + lg) % lg].id] + before = [groups[(idx + 1) % lg].id] else: before, after = [], [] ans: NeighborsMap = {}