From 4689f3f38277bb64981fc960e8e384e2d065d659 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Wed, 15 Oct 2025 17:13:05 +0200 Subject: Make it work again on OpenBSD - Some unused variables - Fix zero window size under lldb - Make instantiation of languages more robust --- src/dged/window.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/dged/window.c') diff --git a/src/dged/window.c b/src/dged/window.c index cad3c7e..7ad4794 100644 --- a/src/dged/window.c +++ b/src/dged/window.c @@ -85,11 +85,13 @@ void windows_init(uint32_t height, uint32_t width, struct buffers *buffers) { BINTREE_INIT(&g_windows.windows); + uint32_t height_ = height > 0 ? height - 1 : 0; + g_minibuffer_window = (struct window){ .buffer_view = buffer_view_create(minibuffer, false, false), .has_prev_buffer_view = false, .x = 0, - .y = height - 1, + .y = height_, .height = 1, .width = width, }; @@ -97,7 +99,7 @@ void windows_init(uint32_t height, uint32_t width, struct window root_window = (struct window){ .buffer_view = buffer_view_create(initial_buffer, true, true), .has_prev_buffer_view = false, - .height = height - 1, + .height = height_, .width = width, .x = 0, .y = 0, -- cgit v1.2.3