Merge pull request #422 from cartoonist/master

Fix #141
This commit is contained in:
Bruno Sutic 2021-12-19 16:19:30 +01:00 committed by GitHub
commit dc6252d950
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -270,9 +270,6 @@ restore_all_panes() {
restore_pane "$line"
fi
done < $(last_resurrect_file)
if is_restoring_pane_contents; then
rm "$(pane_contents_dir "restore")"/*
fi
}
handle_session_0() {
@ -375,6 +372,12 @@ restore_active_and_alternate_sessions() {
done < $(last_resurrect_file)
}
cleanup_restored_pane_contents() {
if is_restoring_pane_contents; then
rm "$(pane_contents_dir "restore")"/*
fi
}
main() {
if supported_tmux_version_ok && check_saved_session_exists; then
start_spinner "Restoring..." "Tmux restore complete!"
@ -394,6 +397,7 @@ main() {
restore_grouped_sessions # also restores active and alt windows for grouped sessions
restore_active_and_alternate_windows
restore_active_and_alternate_sessions
cleanup_restored_pane_contents
execute_hook "post-restore-all"
stop_spinner
display_message "Tmux restore complete!"