aboutsummaryrefslogtreecommitdiffstats
path: root/i_ui.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2023-12-20 20:20:20 +0100
committerJoe <rbo@gmx.us>2023-12-20 20:20:20 +0100
commitd5c70797ac9844db0a455e01c7bb3f99e6ca32b0 (patch)
treea8aa101513003fb3928b3a418e66d6032759a494 /i_ui.go
parentgG (diff)
downloadhardflip-d5c70797ac9844db0a455e01c7bb3f99e6ca32b0.tar.gz
hardflip-d5c70797ac9844db0a455e01c7bb3f99e6ca32b0.tar.bz2
hardflip-d5c70797ac9844db0a455e01c7bb3f99e6ca32b0.tar.xz
hardflip-d5c70797ac9844db0a455e01c7bb3f99e6ca32b0.tar.zst
hardflip-d5c70797ac9844db0a455e01c7bb3f99e6ca32b0.zip
fuck ye
Diffstat (limited to 'i_ui.go')
-rw-r--r--i_ui.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/i_ui.go b/i_ui.go
index 5236ef8..aa56c45 100644
--- a/i_ui.go
+++ b/i_ui.go
@@ -384,8 +384,10 @@ func i_ui(data *Data) {
}
data.s.Show()
i_events(data, &sel, &sel_max, &term_size)
- if int(sel) > term_size[H] - 4 {
- // data.list_start = data.list
+ if int(sel) > data.list_start + term_size[H] - 4 {
+ data.list_start = int(sel + 1) - term_size[H] + 3
+ } else if int(sel) < data.list_start {
+ data.list_start = int(sel)
}
}
}