A new option single_window_padding_width to use a different padding when only a single window is visible

Fixes #6734
This commit is contained in:
Kovid Goyal
2023-10-20 08:37:45 +05:30
parent 512a672398
commit 4b997a961c
10 changed files with 52 additions and 10 deletions

View File

@@ -164,6 +164,14 @@ class Tab: # {{{
self._set_current_layout(l0)
self.startup(session_tab)
def has_single_window_visible(self) -> bool:
if self.current_layout.only_active_window_visible:
return True
for i, g in enumerate(self.windows.iter_all_layoutable_groups(only_visible=True)):
if i > 0:
return False
return True
def set_enabled_layouts(self, val: Iterable[str]) -> None:
self.enabled_layouts = [x.lower() for x in val] or ['tall']
if self.current_layout.name not in self.enabled_layouts: