diff options
| author | citrons <citrons@mondecitronne.com> | 2025-06-09 14:45:51 -0500 |
|---|---|---|
| committer | citrons <citrons@mondecitronne.com> | 2025-06-09 14:46:11 -0500 |
| commit | cd06a27e20717cdfbcc6840328f67405acc7c9e7 (patch) | |
| tree | 9cc2e9c67c749f4a9e263d586a244b7e7746b5fd /tui/scroll_state.go | |
| parent | dc957f6bb77c9d89b52f22b605f79f7be110f546 (diff) | |
jump to message
Diffstat (limited to 'tui/scroll_state.go')
| -rw-r--r-- | tui/scroll_state.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tui/scroll_state.go b/tui/scroll_state.go index 75797b1..a712634 100644 --- a/tui/scroll_state.go +++ b/tui/scroll_state.go @@ -6,6 +6,7 @@ type ScrollState struct { absolute int atFirst bool atLast bool + NoSnap bool } func (s *ScrollState) ToStart() { @@ -25,6 +26,10 @@ func (s *ScrollState) Scroll(amnt int) { s.absolute += amnt } +func (s *ScrollState) To(id string) { + s.at = id +} + func (s *ScrollState) ByMouse(ev MouseEvent, reverse bool) { scroll := ev.Scroll * 5 if reverse { |
