From 8ef062efd94975885776e61b6df936088b018da0 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Mon, 5 Mar 2018 09:57:34 -0800 Subject: 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. --- src/display.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/display.rs') diff --git a/src/display.rs b/src/display.rs index 733c66e8..5e540a8b 100644 --- a/src/display.rs +++ b/src/display.rs @@ -24,7 +24,6 @@ use config::Config; use font::{self, Rasterize}; use meter::Meter; use renderer::{self, GlyphCache, QuadRenderer}; -use selection::Selection; use term::{Term, SizeInfo}; use window::{self, Size, Pixels, Window, SetInnerSize}; @@ -323,7 +322,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, config: &Config, selection: Option<&Selection>) { + pub fn draw(&mut self, mut terminal: MutexGuard, config: &Config) { // Clear dirty flag terminal.dirty = !terminal.visual_bell.completed(); @@ -371,7 +370,7 @@ impl Display { // Draw the grid api.render_cells( - terminal.renderable_cells(config, selection, window_focused), + terminal.renderable_cells(config, window_focused), glyph_cache, ); }); -- cgit