diff options
Diffstat (limited to 'alacritty_terminal/src/input.rs')
-rw-r--r-- | alacritty_terminal/src/input.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/alacritty_terminal/src/input.rs b/alacritty_terminal/src/input.rs index 17d427cd..b4ea5910 100644 --- a/alacritty_terminal/src/input.rs +++ b/alacritty_terminal/src/input.rs @@ -66,6 +66,7 @@ pub trait ActionContext { fn clear_selection(&mut self); fn update_selection(&mut self, point: Point, side: Side); fn simple_selection(&mut self, point: Point, side: Side); + fn block_selection(&mut self, point: Point, side: Side); fn semantic_selection(&mut self, point: Point); fn line_selection(&mut self, point: Point); fn selection_is_empty(&self) -> bool; @@ -612,7 +613,11 @@ impl<'a, A: ActionContext + 'a> Processor<'a, A> { // Start new empty selection let side = self.ctx.mouse().cell_side; if let Some(point) = point { - self.ctx.simple_selection(point, side); + if modifiers.ctrl { + self.ctx.block_selection(point, side); + } else { + self.ctx.simple_selection(point, side); + } } let report_modes = @@ -991,6 +996,8 @@ mod tests { fn simple_selection(&mut self, _point: Point, _side: Side) {} + fn block_selection(&mut self, _point: Point, _side: Side) {} + fn copy_selection(&mut self, _: ClipboardType) {} fn clear_selection(&mut self) {} |