Bugfix: "auto restore" feature not working on tmux 1.9a

This commit is contained in:
Bruno Sutic 2015-02-20 23:20:10 +01:00
parent bdc47273d3
commit f821d353ea
No known key found for this signature in database
GPG Key ID: 66D96E4F2F7EF26C
2 changed files with 9 additions and 4 deletions

View File

@ -2,6 +2,7 @@
### master ### master
- properly quote scripts - properly quote scripts
- bugfix: "auto restore" feature does not work on tmux `1.9a`
### v3.0.0, 2015-02-20 ### v3.0.0, 2015-02-20
- rename the plugin from `tmux-resurrect-auto` to `tmux-continuum` - rename the plugin from `tmux-resurrect-auto` to `tmux-continuum`

View File

@ -41,11 +41,15 @@ add_resurrect_save_interpolation() {
fi fi
} }
# on tmux server start, when tmux.conf is sourced there are no sessions and number_of_sessions() {
# `tmux has` reports 1 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() {
tmux has [ "$(number_of_sessions)" -eq 0 ]
[ $? -eq 1 ]
} }
start_auto_restore_in_background() { start_auto_restore_in_background() {