From 6980fce8ec6ec0681fbd5e3992f28ebb442b60f7 Mon Sep 17 00:00:00 2001 From: octotep Date: Sun, 22 Nov 2020 07:52:48 -0500 Subject: [PATCH] Disable the mouse capture in the demo to allow scrolling to work (#514) --- examples/interactive-demo/src/test/event.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/interactive-demo/src/test/event.rs b/examples/interactive-demo/src/test/event.rs index 9cf7b71..d7d879b 100644 --- a/examples/interactive-demo/src/test/event.rs +++ b/examples/interactive-demo/src/test/event.rs @@ -2,7 +2,7 @@ use crossterm::{ cursor::position, - event::{read, EnableMouseCapture, Event, KeyCode}, + event::{read, DisableMouseCapture, EnableMouseCapture, Event, KeyCode}, execute, Result, }; use std::io::Write; @@ -28,6 +28,8 @@ where } } + execute!(w, DisableMouseCapture)?; + Ok(()) }