Some updates

This commit is contained in:
2025-10-22 16:38:12 -05:00
parent b00f1ce9c5
commit cf47b5a4e4
7 changed files with 221 additions and 17 deletions

View File

@@ -291,20 +291,20 @@ func (w *Cli) initKeyMap() {
return true
},
tcell.KeyPgUp: func(ev *tcell.EventKey) bool {
if w.historyPosition < len(w.log)-w.h-2 {
w.historyPosition += (w.h - 2)
if w.historyPosition > len(w.log) {
w.historyPosition = len(w.log)
if w.logPosition < len(w.log)-w.h-2 {
w.logPosition += (w.h - 2)
if w.logPosition > len(w.log) {
w.logPosition = len(w.log)
}
return true
}
return false
},
tcell.KeyPgDn: func(ev *tcell.EventKey) bool {
if w.historyPosition > 0 {
w.historyPosition -= (w.h - 2)
if w.historyPosition < 0 {
w.historyPosition = 0
if w.logPosition > 0 {
w.logPosition -= (w.h - 2)
if w.logPosition < 0 {
w.logPosition = 0
}
return true
}