summaryrefslogtreecommitdiff
path: root/ui/ui.go
diff options
context:
space:
mode:
authordelthas <delthas@dille.cc>2022-04-20 17:45:37 +0200
committerdelthas <delthas@dille.cc>2022-04-20 17:45:37 +0200
commit180940b653d1f9b46b164292e91a53aedd88d48d (patch)
treee3aa907deaabc8d441504203b820748c871d831b /ui/ui.go
parentScroll horizontal channel list with the mouse wheel (diff)
Enable clicking on a horizontal buffer to switch to it
This is inspired by a patch from mooff. This keeps the same click & drag behavior as for the vertical channel list.
Diffstat (limited to 'ui/ui.go')
-rw-r--r--ui/ui.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/ui.go b/ui/ui.go
index 6a9979a..f3d232b 100644
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -180,6 +180,10 @@ func (ui *UI) ScrollChannelDownBy(n int) {
ui.channelOffset += n
}
+func (ui *UI) HorizontalBufferOffset(x int) int {
+ return ui.bs.HorizontalBufferOffset(x, ui.channelOffset)
+}
+
func (ui *UI) ChannelOffset() int {
return ui.channelOffset
}