Allow specifying whether to count windows at prompts or not for confirm_clsoe

This commit is contained in:
Kovid Goyal
2021-08-20 17:13:42 +05:30
parent 8397970bf8
commit 5bc569c4dd
4 changed files with 22 additions and 10 deletions
+7
View File
@@ -814,6 +814,13 @@ class TabManager: # {{{
count += tab.number_of_windows_with_running_programs
return count
@property
def number_of_windows(self) -> int:
count = 0
for tab in self:
count += len(tab)
return count
def tab_for_id(self, tab_id: int) -> Optional[Tab]:
for t in self.tabs:
if t.id == tab_id: