# libtmux::Pane::leave_mode

- **Module:** libtmux::Pane
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/85e8bd603a322dc32bb8b9aeb1a72bcf36945f1d/include/libtmux/entities.hpp#L668
- **Page:** https://libtmux.org/reference/cxx/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.
