1
0
mirror of https://github.com/tmux-plugins/tmux-resurrect.git synced 2024-06-28 07:50:56 +02:00
tmux-resurrect/scripts
Bruno Sutic 5f04ceabbc
Add sleep when saving zoomed windows
When saving zoomed windows:

- window is un-zoomed
- window layout snapshot is taken
- window is zoomed back

This is done because otherwise tmux does not provide correct window
layout. With this we're working around a tmux bug really.

The above causes an issue with vim. For some reason vim cannot properly
reload it's content when "un-zoom + zoom" is done quickly. Everything
works ok if a little sleep/wait is added, so we're doing just that.
0.1 second sleep seems to be enough.

About `sleep 0.1 || sleep 1`: this is a hack. We want to wait for 0.1
seconds, which seems to be enough to fix the issue. However, according
to POSIX, `sleep` command takes only integers.
BUT, decimal values seem to work everywhere. So, we're using a decimal
value, and if that fails, we behave POSIX friendly.

Related to issue #112.
2015-10-26 01:22:46 +01:00
..
check_tmux_version.sh Support only Tmux v1.9 or greater 2014-08-26 15:47:31 +02:00
helpers.sh More portable pane_capture archiving 2015-07-10 19:29:40 +02:00
process_restore_helpers.sh try to treat inline strategy as alias for strategy 2015-06-11 15:29:13 +02:00
restore.exp Command line script that fully restores tmux environment 2014-09-24 14:33:46 +02:00
restore.sh Implement pane content files compression 2015-07-10 18:01:20 +02:00
save.sh Add sleep when saving zoomed windows 2015-10-26 01:22:46 +01:00
spinner_helpers.sh Show spinner during the env save process 2014-08-29 19:51:47 +02:00
tmux_spinner.sh Quote arguments in tmux display-message 2014-09-24 14:30:05 +02:00
variables.sh Mutt added to the list of automatically restored programs 2015-08-14 19:23:36 +02:00