aboutsummaryrefslogtreecommitdiff
path: root/src/display.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-12-22 13:43:06 -0500
committerJoe Wilm <joe@jwilm.com>2016-12-22 13:44:13 -0500
commit6e708d2119ce0c839a89858a42a6b124a5cf48f4 (patch)
treea4ea2078153d136536587e04922f4ec841860298 /src/display.rs
parentfd11660c0a714852a3f477a6730d49b9694e1345 (diff)
downloadalacritty-6e708d2119ce0c839a89858a42a6b124a5cf48f4.tar.gz
alacritty-6e708d2119ce0c839a89858a42a6b124a5cf48f4.zip
Implement visual component of mouse selections
This adds the ability to click and drag with the mouse and have the effect of visually selecting text. The ability to copy the selection into a clipboard buffer is not yet implemented.
Diffstat (limited to 'src/display.rs')
-rw-r--r--src/display.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/display.rs b/src/display.rs
index a6b6528d..e12d1c8f 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -18,13 +18,14 @@ use std::sync::mpsc;
use parking_lot::{MutexGuard};
-use font;
use Rgb;
use ansi::Color;
use cli;
use config::Config;
+use font;
use meter::Meter;
use renderer::{GlyphCache, QuadRenderer};
+use selection::Selection;
use term::{Term, SizeInfo};
use window::{self, Size, Pixels, Window, SetInnerSize};
@@ -211,7 +212,7 @@ impl Display {
/// A reference to Term whose state is being drawn must be provided.
///
/// This call may block if vsync is enabled
- pub fn draw(&mut self, mut terminal: MutexGuard<Term>, config: &Config) {
+ pub fn draw(&mut self, mut terminal: MutexGuard<Term>, config: &Config, selection: &Selection) {
// This is a hack since sometimes we get stuck waiting for events
// in the main loop otherwise.
//
@@ -237,7 +238,7 @@ impl Display {
api.clear();
// Draw the grid
- api.render_cells(terminal.renderable_cells(), glyph_cache);
+ api.render_cells(terminal.renderable_cells(selection), glyph_cache);
});
}