mirror of
https://github.com/Kyren223/eko.git
synced 2026-08-31 03:33:33 +00:00
Implemented g to go to the top message and shift+g/enter to go to the
bottom
This commit is contained in:
@@ -170,6 +170,16 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
|
||||
m.Scroll(m.messagesHeight / 2)
|
||||
case "ctrl+d":
|
||||
m.Scroll(-m.messagesHeight / 2)
|
||||
case "g":
|
||||
// HACK: hacky way to scroll to the top
|
||||
// Also for the first time a user scrolls there will be a visual
|
||||
// glitch that doesn't show the top message being selected
|
||||
m.Scroll(10000) // Large numbers can slow this!!!!
|
||||
case "G":
|
||||
fallthrough
|
||||
case "enter":
|
||||
m.offset = SnapToBottom
|
||||
m.index = -1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user