summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wintable/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/wintable/main.c b/wintable/main.c
index de8c35c..248cf17 100644
--- a/wintable/main.c
+++ b/wintable/main.c
@@ -127,6 +127,7 @@ static void selectItem(struct table *t, WPARAM wParam, LPARAM lParam)
y = GET_Y_LPARAM(lParam);
h = rowHeight(t);
y += t->firstVisible * h;
+ y -= t->headerHeight;
y /= h;
t->selected = y;
if (t->selected >= t->count)