From 87e5b1aa25ea61937fa5f79668d2a46e88707c5e Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Thu, 18 Jun 2020 01:02:56 +0000 Subject: Add automatic scrolling during selection This adds a new `Scheduler` which allows for staging events to be processed at a later time. If there is a selection active and the mouse is above or below the window, the viewport will now scroll torwards the direction of the mouse. The amount of lines scrolled depends on the distance of the mouse to the boundaries used for selection scrolling. To make it possible to scroll while in fullscreen, the selection scrolling area includes the padding of the window and is at least 5 pixels high in case there is not enough padding present. --- alacritty/src/config/monitor.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'alacritty/src/config/monitor.rs') diff --git a/alacritty/src/config/monitor.rs b/alacritty/src/config/monitor.rs index d91b2e4b..42603c7e 100644 --- a/alacritty/src/config/monitor.rs +++ b/alacritty/src/config/monitor.rs @@ -4,10 +4,9 @@ use std::time::Duration; use notify::{watcher, DebouncedEvent, RecursiveMode, Watcher}; -use alacritty_terminal::event::{Event, EventListener}; use alacritty_terminal::util; -use crate::event::EventProxy; +use crate::event::{Event, EventProxy}; pub struct Monitor { _thread: ::std::thread::JoinHandle<()>, -- cgit