summaryrefslogtreecommitdiff
path: root/wintable
diff options
context:
space:
mode:
Diffstat (limited to 'wintable')
-rw-r--r--wintable/draw.h1
-rw-r--r--wintable/scroll.h4
2 files changed, 4 insertions, 1 deletions
diff --git a/wintable/draw.h b/wintable/draw.h
index 2c6267a..3aeb300 100644
--- a/wintable/draw.h
+++ b/wintable/draw.h
@@ -166,7 +166,6 @@ static void draw(struct table *t, HDC dc, RECT cliprect, RECT client)
p.xoff = SendMessageW(t->header, HDM_GETBITMAPMARGIN, 0, 0);
p.y = client.top;
-printf("%d %d\n", t->vscrollpos, t->count);
for (i = t->vscrollpos; i < t->count; i++) {
p.row = i;
p.x = client.left - t->hscrollpos;
diff --git a/wintable/scroll.h b/wintable/scroll.h
index 9da2565..ba5a9f8 100644
--- a/wintable/scroll.h
+++ b/wintable/scroll.h
@@ -19,6 +19,10 @@ static void scrollto(struct table *t, int which, struct scrollParams *p, intptr_
pos = 0;
if (pos > p->length - p->pagesize)
pos = p->length - p->pagesize;
+ // TODO this shouldn't have been necessary but alas
+ // TODO the logic is really intended for the whole y origin thing in the scrollbar series; fix that
+ if (pos < 0)
+ pos = 0;
// we don't want to scroll the header
if (GetClientRect(t->hwnd, &scrollArea) == 0)