From 4a191b65bb82d33fcfe9f3ee990d122b57adc024 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 19 Feb 2020 15:27:56 +0530 Subject: [PATCH] Fix a regression in the previous release that broke switching to neighboring windows in the Grid layout when there are less than four windows Fixes #2377 --- docs/changelog.rst | 3 +++ kitty/layout.py | 1 + 2 files changed, 4 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index ecde1f8da..fb8ac1f9b 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -46,6 +46,9 @@ To update |kitty|, :doc:`follow the instructions `. - macOS: When switching input method while a pending multi-key input is in progress, clear the pending input (:iss:`2358`) +- Fix a regression in the previous release that broke switching to neighboring windows + in the Grid layout when there are less than four windows (:iss:`2377`) + 0.16.0 [2020-01-28] -------------------- diff --git a/kitty/layout.py b/kitty/layout.py index 3d26a4187..35eff3e16 100644 --- a/kitty/layout.py +++ b/kitty/layout.py @@ -839,6 +839,7 @@ class Grid(Layout): def neighbors_for_window(self, window, windows): n = len(windows) if n < 4: + self.num_full_size_windows = 1 return Tall.neighbors_for_window(self, window, windows) ncols, nrows, special_rows, special_col = calc_grid_size(n) blank_row = [None for i in range(ncols)]