sixel support for TTerminalWindow
[fanfix.git] / src / jexer / TTerminalWindow.java
index 818a52f6eb6bbccc20dfc45042cad9653ba1b7be..9780e29d7d6643ad0c032801c6605d3320b91052 100644 (file)
@@ -550,13 +550,17 @@ public class TTerminalWindow extends TScrollableWindow
             return;
         }
 
-        if (mouse.isMouseWheelUp()) {
-            verticalDecrement();
-            return;
-        }
-        if (mouse.isMouseWheelDown()) {
-            verticalIncrement();
-            return;
+        // If the emulator is tracking mouse buttons, it needs to see wheel
+        // events.
+        if (emulator.getMouseProtocol() == ECMA48.MouseProtocol.OFF) {
+            if (mouse.isMouseWheelUp()) {
+                verticalDecrement();
+                return;
+            }
+            if (mouse.isMouseWheelDown()) {
+                verticalIncrement();
+                return;
+            }
         }
         if (mouseOnEmulator(mouse)) {
             synchronized (emulator) {