On this page
tmux.Window.Swap
- Module
- tmux
- Declared in
- Window
- Package
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/window_pane_swap.go
- Swap ( ctx : context.Context , request : SwapWindowRequest ) (WindowSwapResult, error)
-
Swap exchanges the receiver and Target exact winlinks. Their stable WindowIDs move to the opposite session-and-index views; a WindowID alone does not identify either endpoint. Unless Detach is set, tmux may change the affected sessions' current-window selection; this is not a global client-focus guarantee.
Swap returns both freshly materialized exact endpoint views. If exact refresh fails after the command, it returns a predicted
WindowSwapResultcarrying both stable IDs and post-swap session/index contexts with the error. Earlier failures return zero; transport errors are delivery-ambiguous.
0 declared, 0 inherited