allow multiple close and removal actions

This commit is contained in:
Kovid Goyal
2021-11-12 21:16:21 +05:30
parent 4fb29e1b6b
commit 74a5d3a25e
2 changed files with 9 additions and 9 deletions

View File

@@ -361,8 +361,8 @@ class Window:
self.current_mouse_event_button = 0
self.current_clipboard_read_ask: Optional[bool] = None
self.prev_osc99_cmd = NotificationCommand()
self.action_on_close: Optional[Callable[['Window'], None]] = None
self.action_on_removal: Optional[Callable[['Window'], None]] = None
self.actions_on_close: List[Callable[['Window'], None]] = []
self.actions_on_removal: List[Callable[['Window'], None]] = []
self.current_marker_spec: Optional[Tuple[str, Union[str, Tuple[Tuple[int, str], ...]]]] = None
self.pty_resized_once = False
self.last_reported_pty_size = (-1, -1, -1, -1)