From c14211ec9c153b4b6296f1a64bf9c40a53e0a2eb Mon Sep 17 00:00:00 2001 From: Modestas Vainius Date: Wed, 4 May 2016 20:00:46 +0300 Subject: [PATCH] Use window_id/pane_id for current_pane_logging. Prior code used window_index/pane_index which were not unique. If a window/pane is destroyed with logging enabled and then recreated, state in current_pane_logging will still indicate that logging is on while in reality it is off. --- scripts/toggle_logging.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/toggle_logging.sh b/scripts/toggle_logging.sh index 9299973..8609288 100755 --- a/scripts/toggle_logging.sh +++ b/scripts/toggle_logging.sh @@ -24,7 +24,7 @@ stop_pipe_pane() { # returns a string unique to current pane pane_unique_id() { - tmux display-message -p "#{session_name}_#{window_index}_#{pane_index}" + tmux display-message -p "#{session_name}_#{window_id}_#{pane_id}" } # saving 'logging' 'not logging' status in a variable unique to pane