Skip to content

Commit 4e22796

Browse files
committed
Fix auto-restore feature
Credit to @badjware for the solution Fixes $45, #52, #54
1 parent 90f4a00 commit 4e22796

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Changelog
22

33
### master
4+
- bugfix: "auto restore" feature stopped working
45

56
### v3.1.0, 2015-03-14
67
- properly quote scripts

continuum.tmux

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,8 @@ add_resurrect_save_interpolation() {
4343
fi
4444
}
4545

46-
number_of_sessions() {
47-
tmux list-sessions |
48-
wc -l |
49-
sed "s/ //g"
50-
}
51-
52-
# when tmux server is first started, number of sessions is 0
5346
just_started_tmux_server() {
54-
[ "$(number_of_sessions)" -eq 0 ]
47+
[ "$(tmux display-message -p -F '#{start_time}')" -gt "$(($(date +%s)-10))" ]
5548
}
5649

5750
start_auto_restore_in_background() {

0 commit comments

Comments
 (0)