diff options
author | Joe Wilm <joe@jwilm.com> | 2018-04-02 08:44:54 -0700 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2018-06-02 09:56:50 -0700 |
commit | b19045da66899999856c6b2cc6707b60c607660a (patch) | |
tree | 79e3ebe269f3122b762fe940173a2e1a56eccf38 /src/selection.rs | |
parent | f66e3e457bdda808cc3f994a02fd6f7ce5ba381e (diff) | |
download | alacritty-b19045da66899999856c6b2cc6707b60c607660a.tar.gz alacritty-b19045da66899999856c6b2cc6707b60c607660a.zip |
Fix BCE ref tests
BCE was broken in attempt to optimize row clearing. The fix is to revert
to passing in the current cursor state when clearing.
Diffstat (limited to 'src/selection.rs')
-rw-r--r-- | src/selection.rs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/selection.rs b/src/selection.rs index 188df348..6f910bce 100644 --- a/src/selection.rs +++ b/src/selection.rs @@ -181,9 +181,6 @@ impl Selection { ) -> Option<Span> where G: SemanticSearch + Dimensions { - let mut start = initial_expansion.start; - let mut end = initial_expansion.end; - // Normalize ordering of selected cells let (front, tail) = if region.start < region.end { (region.start, region.end) @@ -191,13 +188,11 @@ impl Selection { (region.end, region.start) }; - if front < tail && front.line == tail.line { - start = grid.semantic_search_left(front); - end = grid.semantic_search_right(tail); + let (mut start, mut end) = if front < tail && front.line == tail.line { + (grid.semantic_search_left(front), grid.semantic_search_right(tail)) } else { - start = grid.semantic_search_right(front); - end = grid.semantic_search_left(tail); - } + (grid.semantic_search_right(front), grid.semantic_search_left(tail)) + }; if start > end { ::std::mem::swap(&mut start, &mut end); |