# window.Window.refresh

- **Module:** window.Window
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/window.rs#L318
- **Page:** https://libtmux.org/reference/rs/window-window-refresh/

```
window.Window.refresh(mut) -> Result<&mut Self, Error>
```

Replace this handle's snapshot with the window's current state.

The handle keeps following the same link, so a window that moved to a
different index in the same session is found at its new index.

# Errors

Returns [`Error::ObjectGone`] when this session no longer links the
window, or a listing error when tmux could not be read.
