From 8e2b489eedecf39a00019b2c56364f695c1a147d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 22 Oct 2025 12:29:26 +0530 Subject: [PATCH] Fix a couple more places where right/bottom edges were considered inclusive Fixes #9132 (I hope as I cant reproduce it) --- kitty/state.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kitty/state.c b/kitty/state.c index 13e9119ab..3e1c220b4 100644 --- a/kitty/state.c +++ b/kitty/state.c @@ -609,7 +609,7 @@ os_window_regions(OSWindow *os_window, Region *central, Region *tab_bar) { central->top = 0; long bottom = os_window->viewport_height - tab_bar_height; central->bottom = MAX(0, bottom); - tab_bar->top = central->bottom + 1 + margin_inner; + tab_bar->top = central->bottom + margin_inner; break; } tab_bar->left = central->left; tab_bar->right = central->right; @@ -832,8 +832,8 @@ wrap_region(Region *r) { PyStructSequence_SET_ITEM(ans, 1, PyLong_FromUnsignedLong(r->top)); PyStructSequence_SET_ITEM(ans, 2, PyLong_FromUnsignedLong(r->right)); PyStructSequence_SET_ITEM(ans, 3, PyLong_FromUnsignedLong(r->bottom)); - PyStructSequence_SET_ITEM(ans, 4, PyLong_FromUnsignedLong(r->right - r->left + 1)); - PyStructSequence_SET_ITEM(ans, 5, PyLong_FromUnsignedLong(r->bottom - r->top + 1)); + PyStructSequence_SET_ITEM(ans, 4, PyLong_FromUnsignedLong(r->right - r->left)); + PyStructSequence_SET_ITEM(ans, 5, PyLong_FromUnsignedLong(r->bottom - r->top)); } return ans; }