Skip to content

Commit ade3763

Browse files
committed
Window(fix[select_layout]): use -p flag for previous layout, not -o
why: select-layout -o restores the old/saved layout (undo), while -p cycles to the previous layout preset. The previous_layout parameter was sending -o instead of -p. Verified in cmd-select-layout.c:89. what: - Change -o to -p for previous_layout flag - Update docstring to reference correct flag
1 parent 81ea8b2 commit ade3763

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/libtmux/window.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ def select_layout(
511511
512512
.. versionadded:: 0.45
513513
previous_layout : bool, optional
514-
Move to the previous layout (``-o`` flag).
514+
Move to the previous layout (``-p`` flag).
515515
516516
.. versionadded:: 0.45
517517
@@ -542,7 +542,7 @@ def select_layout(
542542
cmd.append("-n")
543543

544544
if previous_layout:
545-
cmd.append("-o")
545+
cmd.append("-p")
546546

547547
if layout: # tmux allows select-layout without args
548548
cmd.append(layout)

0 commit comments

Comments
 (0)