diff options
| author | Pietro Gagliardi <[email protected]> | 2014-12-17 14:58:39 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-12-17 14:58:39 -0500 |
| commit | b6340bd349dd78ff30f4a942a77fa4800ba6c579 (patch) | |
| tree | 5b73ee6a86719af2d3f80f9cc9ba23b3cb15f930 | |
| parent | 041c99df078f07f8720bc0a7f395ec5b28465da9 (diff) | |
Fixed Page Down behavior. More TODOs.
| -rw-r--r-- | wintable/new/select.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/wintable/new/select.h b/wintable/new/select.h index 11d7ce9..b0210fe 100644 --- a/wintable/new/select.h +++ b/wintable/new/select.h @@ -154,6 +154,8 @@ when nothing is selected: - end selects the last item regardless of scroll for left and right we will simulate up and down, respectively (so right selects row 0 column 0); remember that you can't have either row or column be -1 but not both + +TODO what happens if page up and page down are pressed with an item selected and the scroll in a different position? */ HANDLER(keyDownSelectHandler) @@ -226,7 +228,10 @@ HANDLER(keyDownSelectHandler) break; case VK_NEXT: if (row == -1) { - row = t->vpagesize; + row = t->vscrollpos + t->vpagesize - 1; + // TODO ensusre this is the case with the real list view + if (row >= t->count) + row = t->count - 1; column = 0; } else { row = t->vscrollpos + t->vpagesize - 1; @@ -243,5 +248,3 @@ HANDLER(keyDownSelectHandler) *lResult = 0; return TRUE; } - -// TODO check keyboard selections with nothing selected |
