summaryrefslogtreecommitdiff
path: root/wintable/new/select.h
diff options
context:
space:
mode:
Diffstat (limited to 'wintable/new/select.h')
-rw-r--r--wintable/new/select.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/wintable/new/select.h b/wintable/new/select.h
index 7ead86f..022fcd0 100644
--- a/wintable/new/select.h
+++ b/wintable/new/select.h
@@ -52,8 +52,8 @@ static void doselect(struct table *t, intptr_t row, intptr_t column)
if (width > clientWidth) // TODO >= ?
hscrollto(t, xpos);
else
- // TODO this formula is wrong
- hscrollby(t, clientWidth - width);
+ // TODO don't use t->hpagesize here? depends if other code uses it
+ hscrollto(t, (xpos + width) - t->hpagesize);
}
// now redraw the old and new /rows/