From cd06a27e20717cdfbcc6840328f67405acc7c9e7 Mon Sep 17 00:00:00 2001 From: citrons Date: Mon, 9 Jun 2025 14:45:51 -0500 Subject: jump to message --- tui/scroll_state.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tui/scroll_state.go') 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 { -- cgit v1.2.3