diff options
author | Joe Wilm <joe@jwilm.com> | 2018-03-05 09:57:34 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2018-03-07 09:51:06 -0800 |
commit | 2cfdd595f11377fbd91536a428e87d949ed9a05e (patch) | |
tree | 95ea005517dd55f7b16d474df765d15e234798ad /src/selection.rs | |
parent | 69f533d19e282c8b2c808be081a562119052d081 (diff) | |
download | alacritty-2cfdd595f11377fbd91536a428e87d949ed9a05e.tar.gz alacritty-2cfdd595f11377fbd91536a428e87d949ed9a05e.zip |
Move selection into Grid
Supporting selections with scrollback has two major components:
1. Grid needs access to Selection so that it may update the scroll
position as the terminal text changes.
2. Selection needs to be implemented in terms of buffer offsets -- NOT
lines -- and be updated when Storage is rotated.
This commit implements the first part.
Diffstat (limited to 'src/selection.rs')
-rw-r--r-- | src/selection.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/selection.rs b/src/selection.rs index 64cee8c2..b5bf5493 100644 --- a/src/selection.rs +++ b/src/selection.rs @@ -39,6 +39,7 @@ use grid::ToRange; /// [`simple`]: enum.Selection.html#method.simple /// [`semantic`]: enum.Selection.html#method.semantic /// [`lines`]: enum.Selection.html#method.lines +#[derive(Debug, Clone)] pub enum Selection { Simple { /// The region representing start and end of cursor movement @@ -64,6 +65,7 @@ pub enum Selection { } /// A Point and side within that point. +#[derive(Debug, Clone)] pub struct Anchor { point: Point, side: Side, |