* usr/bin/byobu-layout.in: LP: #1278277

- fix layout saving, which broke in tmux 1.8
  - incrementally rearrange while building our windows up to restore,
    as sometimes we run out of room; tiling in between seems to work
This commit is contained in:
Dustin Kirkland 2014-03-17 10:58:46 +09:00
commit b6475cca6f
2 changed files with 6 additions and 1 deletions

4
debian/changelog vendored
View file

@ -21,6 +21,10 @@ byobu (5.75) unreleased; urgency=medium
- fix up the uninstallation of byobu launcher
* usr/lib/byobu/include/select-session.py: LP: #1279533
- quick hack to fix crashes when python can't figure out the encoding
* usr/bin/byobu-layout.in: LP: #1278277
- fix layout saving, which broke in tmux 1.8
- incrementally rearrange while building our windows up to restore,
as sometimes we run out of room; tiling in between seems to work
[ Kosuke Asami ]
* usr/lib/byobu/battery: LP: #1289157, #1289157

View file

@ -47,7 +47,7 @@ list_layouts() {
case "$1" in
"save")
layout=$(tmux list-windows | grep "(active)$" | sed -e "s/.*\[layout //" -e "s/\] (active)$//")
layout=$(tmux list-windows | grep "(active)$" | sed -e "s/.*\[layout //" -e "s/\] .*(active)$//")
panes=$(tmux list-panes | wc -l)
if [ -n "$2" ]; then
name="$2"
@ -109,6 +109,7 @@ case "$1" in
# Create panes if nececessary to restore the layout
while [ $(tmux list-panes | wc -l) -lt $panes ]; do
tmux split-window
tmux select-layout tiled
done
# Finally, restore the layout and refresh
tmux select-layout "$layout"