mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-14 04:24:52 +02:00
Fix error when trying to serialize a tab without any windows
This commit is contained in:
@@ -324,9 +324,11 @@ class Tab: # {{{
|
||||
if session_base_dir and ser_opts.relocatable:
|
||||
cwd = os.path.relpath(cwd, session_base_dir)
|
||||
return cwd
|
||||
most_common_cwd = ''
|
||||
cwds = {w.id: make_relative(w.cwd_for_serialization) for g in groups for w in g}
|
||||
from collections import Counter
|
||||
most_common_cwd, _ = Counter(cwds.values()).most_common(1)[0]
|
||||
if cwds:
|
||||
from collections import Counter
|
||||
most_common_cwd, _ = Counter(cwds.values()).most_common(1)[0]
|
||||
for i, g in enumerate(groups):
|
||||
gw: list[str] = []
|
||||
for window in g:
|
||||
|
||||
Reference in New Issue
Block a user