From f66e3e457bdda808cc3f994a02fd6f7ce5ba381e Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sun, 25 Mar 2018 21:09:18 +0200 Subject: Fix selection tests The latest selection changes broke a few tests, these have been corrected. Two of these tests were broken because they assumed different span types, the test have been changed here because the result was correct. One test did actually catch a bug where selection of two cells from right to left would incorrectly mark the cells as selected even though they should not have been, this has been fixed in the `simple_span` method. --- src/input.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/input.rs') diff --git a/src/input.rs b/src/input.rs index 047c81aa..90384198 100644 --- a/src/input.rs +++ b/src/input.rs @@ -664,6 +664,7 @@ mod tests { use config::{self, Config, ClickHandler}; use index::{Point, Side}; use selection::Selection; + use grid::Scroll; use super::{Action, Binding, Processor}; @@ -717,6 +718,10 @@ mod tests { self.last_action = MultiClick::TripleClick; } + fn scroll(&mut self, scroll: Scroll) { + self.terminal.scroll_display(scroll); + } + fn mouse_coords(&self) -> Option { self.terminal.pixels_to_coords(self.mouse.x as usize, self.mouse.y as usize) } -- cgit