From c213919849114ce03def64806af546b9fc391859 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Thu, 27 Jun 2024 21:39:49 +0200 Subject: [PATCH] tty(windows): fix resize event screen size translation from srWindow --- src/windows/Tty.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/windows/Tty.zig b/src/windows/Tty.zig index 9fffab7..53423a1 100644 --- a/src/windows/Tty.zig +++ b/src/windows/Tty.zig @@ -379,8 +379,8 @@ pub fn nextEvent(self: *Tty) !Event { return windows.unexpectedError(windows.kernel32.GetLastError()); } const window_rect = console_info.srWindow; - const width = window_rect.Right - window_rect.Left; - const height = window_rect.Bottom - window_rect.Top; + const width = window_rect.Right - window_rect.Left + 1; + const height = window_rect.Bottom - window_rect.Top + 1; return .{ .winsize = .{ .cols = @intCast(width),