aboutsummaryrefslogtreecommitdiffstats
path: root/thumbs.c
diff options
context:
space:
mode:
Diffstat (limited to 'thumbs.c')
-rw-r--r--thumbs.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/thumbs.c b/thumbs.c
index aea40ee..cae660d 100644
--- a/thumbs.c
+++ b/thumbs.c
@@ -218,18 +218,17 @@ int tns_scroll(tns_t *tns, tnsdir_t dir) {
old = tns->first;
- if (dir == TNS_DOWN && tns->first + tns->cols * tns->rows < tns->cnt)
+ if (dir == TNS_DOWN && tns->first + tns->cols * tns->rows < tns->cnt) {
tns->first += tns->cols;
- else if (dir == TNS_UP && tns->first >= tns->cols)
+ tns_check_view(tns, True);
+ tns->dirty = 1;
+ } else if (dir == TNS_UP && tns->first >= tns->cols) {
tns->first -= tns->cols;
-
- if (tns->first != old) {
tns_check_view(tns, True);
tns->dirty = 1;
- return 1;
- } else {
- return 0;
}
+
+ return tns->first != old;
}
int tns_translate(tns_t *tns, int x, int y) {