diff --git a/docs/changelog.rst b/docs/changelog.rst index 8c6d50813..1ab480fbb 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -18,6 +18,9 @@ To update |kitty|, :doc:`follow the instructions `. - unicode_input kitten: Fix a regression that broke using indices to select recently used symbols. +- Fix a regression that caused closing an overlay window to focus + the previously focused window rather than the underlying window (:iss:`1720`) + 0.14.2 [2019-06-09] --------------------- diff --git a/kitty/tabs.py b/kitty/tabs.py index d252de010..68207f6da 100644 --- a/kitty/tabs.py +++ b/kitty/tabs.py @@ -268,6 +268,12 @@ class Tab: # {{{ next_window_id = self.windows[idx].id active_window_idx = self.current_layout.remove_window(self.windows, window, self.active_window_idx) remove_window(self.os_window_id, self.id, window.id) + if window.overlay_for is not None: + for idx, q in enumerate(self.windows): + if q.id == window.overlay_for: + active_window_idx = idx + next_window_id = q.id + break if next_window_id is None and active_window_idx is not None and len(self.windows) > active_window_idx: next_window_id = self.windows[active_window_idx].id if next_window_id is not None: