From aab149366df17e6725d10744c9b0796d526cfb54 Mon Sep 17 00:00:00 2001 From: ms-test Date: Sun, 16 Oct 2022 03:53:16 -0400 Subject: [PATCH] Check correct pair member I haven't looked deeply, but this looked to be a simple typo unless it's checking one both times because of a type invariant. If that is the case, and the check is correct, then a comment and/or code refactoring to call attention to this would likely be a good idea. --- kitty/layout/splits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kitty/layout/splits.py b/kitty/layout/splits.py index b7c7742d2..ab8d97ffe 100644 --- a/kitty/layout/splits.py +++ b/kitty/layout/splits.py @@ -566,7 +566,7 @@ class Splits(Layout): ans['one'] = p.one if isinstance(p.two, Pair): ans['two'] = add_pair(p.two) - elif p.one is not None: + elif p.two is not None: ans['two'] = p.two return ans