feat(session): restore the last session from a keybinding
Besides the --session=last startup option, the saved state can now be brought back in a running kitty with restore_last_session, mapped to kitty_mod+alt+r. The option types are regenerated so the shortcut is actually part of the default configuration.
This commit is contained in:
7 files changed
+62
-1
No files matched your search
@@ -138,3 +138,8 @@ class TestSessionRestore(BaseTest):
|
||||
self.ae(len(sessions), 1)
|
||||
self.ae(sessions[0].session_name, '')
|
||||
self.assertTrue(any('no saved session' in msg for msg in self.error_messages))
|
||||
|
||||
def test_restore_action_without_state_returns_false(self) -> None:
|
||||
from kitty.session_restore import restore_last_session_into
|
||||
|
||||
self.assertFalse(restore_last_session_into(None)) # type: ignore
|
||||
Reference in new issue
Block a user