diff --git a/docs/changelog.rst b/docs/changelog.rst index 6c0514c7a..fd6c4e0fa 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -211,6 +211,8 @@ Detailed list of changes - macOS: Add Copy and Paste menu items to the Edit menu in the global menu bar (:iss:`9780`) +- Fix dragging of splits layout borders sometimes moving in the wrong direction (:pull:`9447`) + 0.46.2 [2026-03-21] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/layout/splits.py b/kitty/layout/splits.py index 3e8283f1b..b3b636455 100644 --- a/kitty/layout/splits.py +++ b/kitty/layout/splits.py @@ -498,9 +498,9 @@ class Pair: return False if self.two == gid: return True - if not isinstance(self.two, Pair): - return False - return self.two.is_group_on_second(gid) + if isinstance(self.two, Pair): + return self.two.pair_for_window(gid) is not None + return False def find_window_in_tree(self, window_id: int) -> 'list[tuple[Pair, bool]] | None': # Returns list of (pair, is_in_one) from self down to the pair containing window_id.