From 616eb2fc21cb9111b1b480e7f39725f48d4a5807 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 14 Jul 2024 07:52:05 -0700 Subject: [PATCH] fix: PaneInformation.pixel_height returned width! Thank you to Rust's unread field warning! --- docs/changelog.md | 2 ++ wezterm-gui/src/termwindow/mod.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index 032c035d2..5cc9a750e 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -86,6 +86,8 @@ As features stabilize some brief notes about them will accumulate here. in a pure temporary directory; they live in a cache dir, and if someone does remove or truncate these files, we now convert that error case into blank frame(s). #5422 +* PaneInformation object returned `pixel_width` when asked to return the + `pixel_height`. #### Updated * Bundled conpty.dll and OpenConsole.exe to build 1.19.240130002.nupkg diff --git a/wezterm-gui/src/termwindow/mod.rs b/wezterm-gui/src/termwindow/mod.rs index 71ece24c2..2fd543b5f 100644 --- a/wezterm-gui/src/termwindow/mod.rs +++ b/wezterm-gui/src/termwindow/mod.rs @@ -283,7 +283,7 @@ impl UserData for PaneInformation { fields.add_field_method_get("width", |_, this| Ok(this.width)); fields.add_field_method_get("height", |_, this| Ok(this.height)); fields.add_field_method_get("pixel_width", |_, this| Ok(this.pixel_width)); - fields.add_field_method_get("pixel_height", |_, this| Ok(this.pixel_width)); + fields.add_field_method_get("pixel_height", |_, this| Ok(this.pixel_height)); fields.add_field_method_get("title", |_, this| Ok(this.title.clone())); fields.add_field_method_get("user_vars", |_, this| Ok(this.user_vars.clone())); fields.add_field_method_get("foreground_process_name", |_, this| {