- 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)
-
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.In other ports Exchange two windows
- Python
libtmux.Window.swap - Ruby No source-verified Ruby equivalent is recorded for this operation.
- Lua
libtmux.WindowLink:swap - TypeScript
window.Window.swapWith - Rust
window.Window.swap_with - Java no equivalent on
Window - .NET
LibTmux.Window.SwapAsync - C++
libtmux::Window::swap_with - Swift
Server.swap(_:with:)
- Python
0 declared, 0 inherited