Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Go API

Go documentation

tmux.Window.Swap

View as Markdown

Module
tmux
Declared in
Window
Package
github.com/libtmux/libtmux-go/tmux
Source
tmux/window_pane_swap.go
Other languages
Python Ruby LuaTypeScriptRust Java .NETC++Swift
Swap ( ctx : context.Context , request : SwapWindowRequest ) → (WindowSwapResult, error)
method [source]
method [source]
Swap

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 WindowSwapResult carrying both stable IDs and post-swap session/index contexts with the error. Earlier failures return zero; transport errors are delivery-ambiguous.

In other ports Exchange two windows

0 declared, 0 inherited

Esc

Type to search.