zellij-org / zellij

A terminal workspace with batteries included
https://zellij.dev
MIT License
20.92k stars 639 forks source link

fix(serialization): do not serialize junk sessions #3504

Closed imsnif closed 2 months ago

imsnif commented 2 months ago

Previously, sessions would be serialized (for resurrection later) every serialization_interval (default: 60 seconds) regardless of their content. This created a situation where lots of "junk sessions" were created in the cache and clogged it up. Most of these sessions would just be one-offs - not something that we'd actually want to serialize and later resurrect.

This fixes the problem by only serializing a session if it has more than 1 pane*, or if a command is running inside a pane that is not the default shell (eg. vim).

*more accurately, a different number of panes than the layout it was created with - by default this means more than one terminal pane.