tmux_interface/commands/common/
refresh_client_size.rs1use std::fmt;
2
3#[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
4#[cfg(feature = "tmux_3_3")]
5pub struct RefreshClientSize {
6 pub window_id: Option<usize>,
7 pub width: usize,
8 pub height: usize,
9}
10
11#[cfg(feature = "tmux_3_3")]
12impl fmt::Display for RefreshClientSize {
13 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
14 let s = match self.window_id {
15 Some(window_id) => format!("@{}:{}x{}", window_id, self.width, self.height),
16 None => format!("{}x{}", self.width, self.height),
17 };
18
19 write!(f, "{}", s)
20 }
21}