diff options
author | Christian Duerr <contact@christianduerr.com> | 2020-06-18 01:02:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-18 01:02:56 +0000 |
commit | 87e5b1aa25ea61937fa5f79668d2a46e88707c5e (patch) | |
tree | 59205d2e00072a5f8737dc104f57fc940db0c2ec /alacritty_terminal/src/event.rs | |
parent | d526649ee67237a1bedad8228f1f017035ddad3f (diff) | |
download | alacritty-87e5b1aa25ea61937fa5f79668d2a46e88707c5e.tar.gz alacritty-87e5b1aa25ea61937fa5f79668d2a46e88707c5e.zip |
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.
Diffstat (limited to 'alacritty_terminal/src/event.rs')
-rw-r--r-- | alacritty_terminal/src/event.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/alacritty_terminal/src/event.rs b/alacritty_terminal/src/event.rs index 20b105cd..296e3bb0 100644 --- a/alacritty_terminal/src/event.rs +++ b/alacritty_terminal/src/event.rs @@ -1,17 +1,12 @@ use std::borrow::Cow; use std::fmt::{self, Debug, Formatter}; -use std::path::PathBuf; use std::sync::Arc; -use crate::message_bar::Message; use crate::term::{ClipboardType, SizeInfo}; #[derive(Clone)] pub enum Event { - DPRChanged(f64, (u32, u32)), - ConfigReload(PathBuf), MouseCursorDirty, - Message(Message), Title(String), ClipboardStore(ClipboardType, String), ClipboardLoad(ClipboardType, Arc<dyn Fn(&str) -> String + Sync + Send + 'static>), @@ -23,10 +18,7 @@ pub enum Event { impl Debug for Event { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { match self { - Event::DPRChanged(scale, size) => write!(f, "DPRChanged({}, {:?})", scale, size), - Event::ConfigReload(path) => write!(f, "ConfigReload({:?})", path), Event::MouseCursorDirty => write!(f, "MouseCursorDirty"), - Event::Message(msg) => write!(f, "Message({:?})", msg), Event::Title(title) => write!(f, "Title({})", title), Event::ClipboardStore(ty, text) => write!(f, "ClipboardStore({:?}, {})", ty, text), Event::ClipboardLoad(ty, _) => write!(f, "ClipboardLoad({:?})", ty), |