# libtmux::Pane::leave_mode

- **Module:** libtmux::Pane
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/393d4b0ad666f18a6581f1eb281741a75a7503f0/include/libtmux/entities.hpp#L840
- **Page:** https://libtmux.org/en/cxx/latest/reference/libtmux-pane-leave_mode/

```
libtmux::Pane::leave_mode() -> expected< void, CommandFailure >
```

Leave whatever mode the pane is in.

A pane in no mode is refused, with tmux's "not in a mode". That is kept rather than smoothed into success: checking first would cost a round trip and still race, and a caller who cares can read `in_mode` or ignore the failure.
