diff options
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 { |
