Allow undo close session
By gnach... on May 05, 2014 20:17 (imported from Google Code)
After a session closes, you'd have N seconds to undo closing it. This should probably be off by default.
Rather than calling -terminate on user-initiated closes, we'd need to:
- Tell the session that it's suspended. This would disable things like popping modal alert boxes.
- Remove its file descriptor from the select loop.
- Add it to a suspended-sessions list.
- Start a N-second timer.
When the timer fires, call -terminate as usual. If the user selects edit>undo close session then open it as a new tab in the current window. Trying to restore it as a split pane if it had been one would be very difficult if the tab's arrangement of split panes had changed.
Stretch goal: have a long-running daemon that gets a copy of all file descriptors so sessions can survive a crash.