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
commit3e177eab4110067022eddf7c48e4f4ea31a29bd6 (patch)
tree859900b0955bd962721aa83ec377b11688996c6a /i_ui.go
parentpaging in progress (diff)
downloadhardflip-3e177eab4110067022eddf7c48e4f4ea31a29bd6.tar.gz
hardflip-3e177eab4110067022eddf7c48e4f4ea31a29bd6.tar.bz2
hardflip-3e177eab4110067022eddf7c48e4f4ea31a29bd6.tar.xz
hardflip-3e177eab4110067022eddf7c48e4f4ea31a29bd6.tar.zst
hardflip-3e177eab4110067022eddf7c48e4f4ea31a29bd6.zip
wip
Diffstat (limited to 'i_ui.go')
-rw-r--r--i_ui.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/i_ui.go b/i_ui.go
index dced789..3c0638d 100644
--- a/i_ui.go
+++ b/i_ui.go
@@ -39,7 +39,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* hardflip: src/i_ui.go
- * Wed Dec 20 13:53:02 2023
+ * Wed Dec 20 15:24:42 2023
* Joe
*
* interfacing with the user
@@ -49,6 +49,7 @@ package main
import (
"strconv"
+
"github.com/gdamore/tcell/v2"
"golang.org/x/term"
)
@@ -383,9 +384,8 @@ func i_ui(data *Data) {
}
data.s.Show()
i_events(data, &sel, &sel_max, &term_size)
- data.list_start = int(sel) - term_size[H] - 4
- if data.list_start < 0 {
- data.list_start = 0
+ if int(sel) > term_size[H] - 6 {
+ data.list_start += 1
}
}
}