aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src/event.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2020-04-10 21:23:50 +0300
committerGitHub <noreply@github.com>2020-04-10 21:23:50 +0300
commitf14d24542c3ceda3b508c707eb79cf2fe2a04bd1 (patch)
tree8f91c80296644b278733b412127244c2a84bb348 /alacritty/src/event.rs
parent2fc5120327c6eb096154214faec5dc4e1dee2253 (diff)
downloadr-alacritty-f14d24542c3ceda3b508c707eb79cf2fe2a04bd1.tar.gz
r-alacritty-f14d24542c3ceda3b508c707eb79cf2fe2a04bd1.tar.bz2
r-alacritty-f14d24542c3ceda3b508c707eb79cf2fe2a04bd1.zip
Fix various mouse mode + vi mode interactions
This commit fixes some issues introduced by 1a8cd172e520e493bacc9c6a2ae6f80de086eaa3: 1. Vi cursor not moving properly on double/triple click 2. URL not launching via mouse click in vi mode + mouse mode 3. Ability to select in mouse mode with double/triple click regardless of shift modifier
Diffstat (limited to 'alacritty/src/event.rs')
-rw-r--r--alacritty/src/event.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs
index 89aa8be6..e532ac12 100644
--- a/alacritty/src/event.rs
+++ b/alacritty/src/event.rs
@@ -12,7 +12,7 @@ use std::sync::Arc;
use std::time::Instant;
use glutin::dpi::PhysicalSize;
-use glutin::event::{ElementState, Event as GlutinEvent, ModifiersState, MouseButton, WindowEvent};
+use glutin::event::{ElementState, Event as GlutinEvent, ModifiersState, WindowEvent};
use glutin::event_loop::{ControlFlow, EventLoop, EventLoopProxy, EventLoopWindowTarget};
use glutin::platform::desktop::EventLoopExtDesktop;
#[cfg(not(any(target_os = "macos", windows)))]
@@ -295,7 +295,7 @@ impl<'a, N: Notify + 'a, T: EventListener> input::ActionContext<T> for ActionCon
}
}
-#[derive(Debug)]
+#[derive(Debug, Eq, PartialEq)]
pub enum ClickState {
None,
Click,
@@ -319,7 +319,6 @@ pub struct Mouse {
pub cell_side: Side,
pub lines_scrolled: f32,
pub block_url_launcher: bool,
- pub last_button: MouseButton,
pub inside_grid: bool,
}
@@ -339,7 +338,6 @@ impl Default for Mouse {
cell_side: Side::Left,
lines_scrolled: 0.,
block_url_launcher: false,
- last_button: MouseButton::Other(0),
inside_grid: false,
}
}