Ensure we are not using iterators when closing

This commit is contained in:
Kovid Goyal 2023-01-18 09:40:31 +05:30
parent 03abbb315a
commit 0c7b4df6fc
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ Do not return an error if no tabs are matched to be closed.
if payload_get('ignore_no_match'):
return None
raise
for tab in tabs:
for tab in tuple(tabs):
if tab:
boss.close_tab_no_confirm(tab)
return None

View File

@ -46,7 +46,7 @@ Do not return an error if no windows are matched to be closed.
if payload_get('ignore_no_match'):
return None
raise
for window in windows:
for window in tuple(windows):
if window:
boss.mark_window_for_close(window)
return None