summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/term/mod.rs
diff options
context:
space:
mode:
authorJohn Sullivan <jsullivan@csumb.edu>2019-08-24 16:18:51 -0700
committerChristian Duerr <contact@christianduerr.com>2019-08-24 23:18:50 +0000
commitad0365219f7f264ef0fdf0b3e4401bad7ac40e55 (patch)
treef766474d96708579c1a256e32cb69940184bd29b /alacritty_terminal/src/term/mod.rs
parent629ea247cdccc33c6df0037f357ba9be48c7178d (diff)
downloadalacritty-ad0365219f7f264ef0fdf0b3e4401bad7ac40e55.tar.gz
alacritty-ad0365219f7f264ef0fdf0b3e4401bad7ac40e55.zip
Show text cursor when pressing shift in mouse mode
Fixes #2550.
Diffstat (limited to 'alacritty_terminal/src/term/mod.rs')
-rw-r--r--alacritty_terminal/src/term/mod.rs15
1 files changed, 2 insertions, 13 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs
index 2d1ec392..042ad1d0 100644
--- a/alacritty_terminal/src/term/mod.rs
+++ b/alacritty_terminal/src/term/mod.rs
@@ -841,9 +841,9 @@ impl Term {
#[inline]
pub fn scroll_display(&mut self, scroll: Scroll) {
+ self.set_mouse_cursor(MouseCursor::Text);
self.grid.scroll_display(scroll);
self.reset_url_highlight();
- self.reset_mouse_cursor();
self.dirty = true;
}
@@ -1296,18 +1296,7 @@ impl Term {
#[inline]
pub fn set_url_highlight(&mut self, hl: RangeInclusive<index::Linear>) {
self.grid.url_highlight = Some(hl);
- }
-
- #[inline]
- pub fn reset_mouse_cursor(&mut self) {
- let mouse_mode =
- TermMode::MOUSE_MOTION | TermMode::MOUSE_DRAG | TermMode::MOUSE_REPORT_CLICK;
- let mouse_cursor = if self.mode().intersects(mouse_mode) {
- MouseCursor::Default
- } else {
- MouseCursor::Text
- };
- self.set_mouse_cursor(mouse_cursor);
+ self.dirty = true;
}
#[inline]