summaryrefslogtreecommitdiffstats
path: root/thumbs.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-02-20 00:28:28 +0100
committerBert <ber.t@gmx.com>2011-02-20 00:28:28 +0100
commitf0f6644fae8673378936a15781ce96e55f66bec4 (patch)
tree69e539a0292ab8441de45de3fc924e87daef8a7a /thumbs.c
parenta30901210cfde971bac780b5c0bbdeda215ea809 (diff)
downloadnsxiv-f0f6644fae8673378936a15781ce96e55f66bec4.tar.zst
Replaced -T flag with -tt; default thumbnail size
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) {