File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
33### master
4+ - Proper handling of ` automatic-rename ` window option.
45
56### v3.0.0, 2021-08-30
67- save and restore tmux pane contents (@laomaiweng )
Original file line number Diff line number Diff line change @@ -289,9 +289,13 @@ restore_window_properties() {
289289 local window_name
290290 \g rep ' ^window' $( last_resurrect_file) |
291291 while IFS=$d read line_type session_name window_number window_name window_active window_flags window_layout automatic_rename; do
292+ tmux select-layout -t " ${session_name} :${window_number} " " $window_layout "
293+
294+ # Below steps are properly handling window names and automatic-rename
295+ # option. `rename-window` is an extra command in some scenarios, but we
296+ # opted for always doing it to keep the code simple.
292297 window_name=" $( remove_first_char " $window_name " ) "
293298 tmux rename-window -t " ${session_name} :${window_number} " " $window_name "
294- tmux select-layout -t " ${session_name} :${window_number} " " $window_layout "
295299 if [ " ${automatic_rename} " = " :" ]; then
296300 tmux set-option -u -t " ${session_name} :${window_number} " automatic-rename
297301 else
Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ dump_windows() {
246246 continue
247247 fi
248248 automatic_rename=" $( tmux show-window-options -vt " ${session_name} :${window_index} " automatic-rename) "
249- # If the option was unset, place the ":" placeholder instead .
249+ # If the option was unset, use ":" as a placeholder .
250250 [ -z " ${automatic_rename} " ] && automatic_rename=" :"
251251 echo " ${line_type}${d}${session_name}${d}${window_index}${d}${window_name}${d}${window_active}${d}${window_flags}${d}${window_layout}${d}${automatic_rename} "
252252 done
You can’t perform that action at this time.
0 commit comments