Fix auto-restore feature

Credit to @badjware for the solution

Fixes $45, #52, #54
This commit is contained in:
Bruno Sutic 2019-02-07 13:32:58 +01:00
parent 90f4a00c41
commit 4e2279688d
No known key found for this signature in database
GPG Key ID: CAFA7B1B2914ED81
2 changed files with 2 additions and 8 deletions

View File

@ -1,6 +1,7 @@
# Changelog # Changelog
### master ### master
- bugfix: "auto restore" feature stopped working
### v3.1.0, 2015-03-14 ### v3.1.0, 2015-03-14
- properly quote scripts - properly quote scripts

View File

@ -43,15 +43,8 @@ add_resurrect_save_interpolation() {
fi fi
} }
number_of_sessions() {
tmux list-sessions |
wc -l |
sed "s/ //g"
}
# when tmux server is first started, number of sessions is 0
just_started_tmux_server() { just_started_tmux_server() {
[ "$(number_of_sessions)" -eq 0 ] [ "$(tmux display-message -p -F '#{start_time}')" -gt "$(($(date +%s)-10))" ]
} }
start_auto_restore_in_background() { start_auto_restore_in_background() {