# Server.cancelModes(in:)

- **Module:** Server
- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-swift/blob/254f8b2be7eb60cacc3ffcb3ea8e456784f582df/Sources/LibTmux/Navigation.swift#L203
- **Page:** https://libtmux.org/en/swift/latest/reference/server-cancelmodes(in-)/

```
Server.cancelModes(in:)(in: Pane) -> ()
```

Idempotently clears the entire mode stack of a pane.

This is not an inverse specific to ``enterCopyMode(_:)``. tmux's
`copy-mode -q` cancels every active pane mode, including modes entered by
a client or by another command. A pane already outside a mode is success.

## Raises

- `TmuxError`
