diff options
| author | Kyren223 <Kyren223@proton.me> | 2024-12-24 17:17:59 +0200 |
|---|---|---|
| committer | Kyren223 <Kyren223@proton.me> | 2024-12-24 17:17:59 +0200 |
| commit | 534ef0df87f0f26c6211ada1ea8bd53c65acc1e8 (patch) | |
| tree | 59eb373e2bcd70e7bd6fb275626ff0e9c6691d97 /internal/client/ui | |
| parent | 7cf2bbd1b68ac6d7ace3aa200d21cac5f59bd32c (diff) | |
Implemented g to go to the top message and shift+g/enter to go to the
bottom
Diffstat (limited to 'internal/client/ui')
| -rw-r--r-- | internal/client/ui/core/chat/chat.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/client/ui/core/chat/chat.go b/internal/client/ui/core/chat/chat.go index b3f6dec..f2b0362 100644 --- a/internal/client/ui/core/chat/chat.go +++ b/internal/client/ui/core/chat/chat.go @@ -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 } } |
