From a0a3f2fd56adcac7f03608ac265e5d7ea2abd7fb Mon Sep 17 00:00:00 2001 From: Bruno Sutic Date: Tue, 2 Sep 2014 22:47:38 +0200 Subject: [PATCH] When a pane is not restored, don't restore it's program --- CHANGELOG.md | 3 +++ scripts/process_restore_helpers.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 66c9d6a..2882247 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ### master - tweak 'new_pane' creation strategy to fix #36 +- when running multiple tmux server and for a large number of panes (120 +) when + doing a restore, some panes might not be created. When that is the case also + don't restore programs for those panes. ### v1.2.0, 2014-09-01 - new feature: inline strategies when restoring a program diff --git a/scripts/process_restore_helpers.sh b/scripts/process_restore_helpers.sh index f849d30..cdf793f 100644 --- a/scripts/process_restore_helpers.sh +++ b/scripts/process_restore_helpers.sh @@ -43,6 +43,9 @@ _process_should_be_restored() { # Scenario where pane existed before restoration, so we're not # restoring the proces either. return 1 + elif ! pane_exists "$session_name" "$window_number" "$pane_index"; then + # pane number limit exceeded, pane does not exist + return 1 elif _restore_all_processes; then return 0 elif _process_on_the_restore_list "$pane_full_command"; then