mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-09-06 09:48:27 +00:00
save_as_session recorded only the state of the tab's active layout, so the state of any layout the tab had been toggled away from was lost. Toggling a splits tab to the stack layout and saving discarded the splits tree entirely, because Stack has no layout_state() of its own, and switching back to splits after restoring rebuilt the tree from scratch along the default axis. The session file also carried no last_used_layout, so _last_used_layout was None after a restore and toggle_layout <current layout> silently did nothing, since it delegates to last_used_layout() which returns early when unset. The key that produced the stack layout no longer undid it. Tab now keeps the layouts it has used, by name, and writes their state plus last_used_layout into the existing set_layout_state JSON rather than adding new session commands. Older versions of kitty ignore unknown keys in that dict but abort on unknown commands, so nesting keeps session files readable by them. Restoring the state of a layout that is not being made current must not reorder the window list, since only the current layout determines window order, hence apply_to_window_list. Splits.set_layout_state also has to accept state for a layout whose tree is still empty, which is the case for a layout that has not laid out any windows yet. Fixes #10320 |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| atexit.py | ||
| base.py | ||
| CascadiaCode-Regular.otf | ||
| check_build.py | ||
| child.py | ||
| clipboard.py | ||
| ComfyCode-Regular.ttf | ||
| command_palette.py | ||
| completion.py | ||
| crypto.py | ||
| datatypes.py | ||
| dnd.py | ||
| dnd_kitten.py | ||
| file_transmission.py | ||
| FiraCode-Medium.otf | ||
| fonts.py | ||
| glfw.py | ||
| gr.py | ||
| GraphemeBreakTest.json | ||
| graphics.py | ||
| iosevka-regular.ttf | ||
| keys.py | ||
| layout.py | ||
| LiberationMono-Regular.ttf | ||
| main.py | ||
| mouse.py | ||
| multicell.py | ||
| notifications.py | ||
| open_actions.py | ||
| options.py | ||
| panels.py | ||
| parser.py | ||
| screen.py | ||
| search_query_parser.py | ||
| shell_integration.py | ||
| shm.py | ||
| slang.py | ||
| ssh.py | ||
| tab_bar.py | ||
| tui.py | ||
| twemoji_smiley-cff2_colr_1.otf | ||
| utmp.py | ||