From b5a50a26ebac6a08dacf79f5d1db9bdd94ba33a5 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Fri, 12 Mar 2021 15:08:48 +0100 Subject: [PATCH] Fix many thinkos Somehow I forgot to save after copy-pasting some code and changing it. --- lib/std/Progress.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/std/Progress.zig b/lib/std/Progress.zig index ee41501bfc..b1f8dff1c1 100644 --- a/lib/std/Progress.zig +++ b/lib/std/Progress.zig @@ -214,8 +214,9 @@ fn refreshWithHeldLock(self: *Progress) void { const window_width = @intCast(windows.DWORD, info.srWindow.Right - info.srWindow.Left) + 1; // Number of terminal cells to clear, starting from the cursor position // and ending at the window bottom right corner. - const fill_chars = window_width * (window_width - @intCast(windows.DWORD, info.dwCursorPosition.Y - info.srWindow.Top)) - - @intCast(windows.DWORD, info.dwCursorPosition.Y - info.srWindow.Top); + const fill_chars = window_width * (window_height - + @intCast(windows.DWORD, info.dwCursorPosition.Y - info.srWindow.Top)) - + @intCast(windows.DWORD, info.dwCursorPosition.X - info.srWindow.Left); var written: windows.DWORD = undefined; if (windows.kernel32.FillConsoleOutputAttribute(