diff options
author | Joe Wilm <joe@jwilm.com> | 2016-12-22 13:43:06 -0500 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-12-22 13:44:13 -0500 |
commit | 6e708d2119ce0c839a89858a42a6b124a5cf48f4 (patch) | |
tree | a4ea2078153d136536587e04922f4ec841860298 /src/grid.rs | |
parent | fd11660c0a714852a3f477a6730d49b9694e1345 (diff) | |
download | alacritty-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/grid.rs')
-rw-r--r-- | src/grid.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/grid.rs b/src/grid.rs index d8b701b9..07255cb4 100644 --- a/src/grid.rs +++ b/src/grid.rs @@ -24,10 +24,16 @@ use std::borrow::ToOwned; use std::cmp::Ordering; use std::iter::IntoIterator; use std::ops::{Deref, DerefMut, Range, RangeTo, RangeFrom, RangeFull, Index, IndexMut}; +use std::ops::RangeInclusive; use std::slice::{self, Iter, IterMut}; use index::{self, Cursor}; +/// Convert a type to a linear index range. +pub trait ToRange { + fn to_range(&self, columns: index::Column) -> RangeInclusive<index::Linear>; +} + /// Represents the terminal display contents #[derive(Clone, Debug, Deserialize, Serialize, Eq, PartialEq)] pub struct Grid<T> { |