mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-24 22:08:46 +00:00
Fix even more bugs in before last commit
First, increment the relevant indices in the awk statements regarding windows, as now the window_name entry exists. Second, remove the window_name entry from the dump_pane_contents and dump_shell_history functions as it no longer exists in the format.
This commit is contained in:
parent
02a7f1f9d6
commit
1b63a940a0
@ -355,7 +355,7 @@ restore_grouped_sessions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
restore_active_and_alternate_windows() {
|
restore_active_and_alternate_windows() {
|
||||||
awk 'BEGIN { FS="\t"; OFS="\t" } /^window/ && $5 ~ /[*-]/ { print $2, $4, $3; }' $(last_resurrect_file) |
|
awk 'BEGIN { FS="\t"; OFS="\t" } /^window/ && $6 ~ /[*-]/ { print $2, $4, $3; }' $(last_resurrect_file) |
|
||||||
sort -u |
|
sort -u |
|
||||||
while IFS=$d read session_name active_window window_number; do
|
while IFS=$d read session_name active_window window_number; do
|
||||||
tmux switch-client -t "${session_name}:${window_number}"
|
tmux switch-client -t "${session_name}:${window_number}"
|
||||||
|
@ -259,14 +259,14 @@ dump_state() {
|
|||||||
dump_pane_contents() {
|
dump_pane_contents() {
|
||||||
local pane_contents_area="$(get_tmux_option "$pane_contents_area_option" "$default_pane_contents_area")"
|
local pane_contents_area="$(get_tmux_option "$pane_contents_area_option" "$default_pane_contents_area")"
|
||||||
dump_panes_raw |
|
dump_panes_raw |
|
||||||
while IFS=$d read line_type session_name window_number window_name window_active window_flags pane_index dir pane_active pane_command pane_pid history_size; do
|
while IFS=$d read line_type session_name window_number window_active window_flags pane_index dir pane_active pane_command pane_pid history_size; do
|
||||||
capture_pane_contents "${session_name}:${window_number}.${pane_index}" "$history_size" "$pane_contents_area"
|
capture_pane_contents "${session_name}:${window_number}.${pane_index}" "$history_size" "$pane_contents_area"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
dump_shell_history() {
|
dump_shell_history() {
|
||||||
dump_panes |
|
dump_panes |
|
||||||
while IFS=$d read line_type session_name window_number window_name window_active window_flags pane_index dir pane_active pane_command full_command; do
|
while IFS=$d read line_type session_name window_number window_active window_flags pane_index dir pane_active pane_command full_command; do
|
||||||
save_shell_history "$session_name:$window_number.$pane_index" "$pane_command" "$full_command"
|
save_shell_history "$session_name:$window_number.$pane_index" "$pane_command" "$full_command"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user