From f4587005792b01bb18a031565da1eeab0f9409f3 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 14 Dec 2014 18:06:08 -0500 Subject: [PATCH] Fixed selection scrolling. --- wintable/new/select.h | 4 ++-- 1 file 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/