aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
}
}
}