about summary refs log tree commit diff stats
path: root/src/local/client.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-03-11 11:25:30 +0100
committerbptato <nincsnevem662@gmail.com>2024-03-11 11:25:30 +0100
commitdbd5052d8f704d46d3664dc4aa8fb79dd2cea664 (patch)
tree2a2fa02732b7638c425145b15ce97452017e3268 /src/local/client.nim
parent8ba5a04705670d0cf2a1fc6fb05e24947f7b12cc (diff)
downloadchawan-dbd5052d8f704d46d3664dc4aa8fb79dd2cea664.tar.gz
client: only accept "press" input type for scroll wheel
Diffstat (limited to 'src/local/client.nim')
-rw-r--r--src/local/client.nim8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/local/client.nim b/src/local/client.nim
index 7821eb23..c55d6ba6 100644
--- a/src/local/client.nim
+++ b/src/local/client.nim
@@ -341,8 +341,12 @@ proc handleCommandInput(client: Client, c: char): EmptyPromise =
                   container.scrollDown(-diff[1])
               client.pressed = (-1, -1)
             else: discard
-          of mibWheelUp: container.scrollUp(5)
-          of mibWheelDown: container.scrollDown(5)
+          of mibWheelUp:
+            if input.t == mitPress:
+              container.scrollUp(5)
+          of mibWheelDown:
+            if input.t == mitPress:
+              container.scrollDown(5)
           of mibButton6, mibButton8:
             if input.t == mitPress:
               discard client.pager.nextBuffer()