# LibTmux.Window.MoveAsync

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Window.Move.cs#L23
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-window-moveasync/

tmux command: [`move-window`](/en/tmux/latest/manual/move-window/)

```
LibTmux.Window.MoveAsync(request: MoveWindowRequest, cancellationToken: CancellationToken) -> Task<Window>
```

Moves this window to another index or session.

A renumber request preserves placement order and returns this link at
its new index; renumbering another session leaves this link in place.
A guard in the native queue checks that the captured session/index
still names this window before the mutation. Reads before and after
the command detect inconsistent placement changes, but do not make
the operation atomic. A failed readback reports unknown
dispatch state: the move already succeeded and must not be retried.

## Parameters

- `request` (`MoveWindowRequest`): Where the window goes.
- `cancellationToken` (`CancellationToken`): Cancels the tmux command.

## Returns

A replacement handle carrying the affected placement.
