mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 22:28:24 +02:00
Ensure we are not using iterators when closing
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user