diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-07-21 17:17:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-21 17:17:41 +0000 |
commit | f50ca1a54c94fe324d22d985c1acae1ff7c16a80 (patch) | |
tree | 7fc2e79f7dccf512fe71f841ef5434e0b1d2b5d7 /src/selection.rs | |
parent | b05ad74fe6d42ce0f913e02ef633ca119fc0b43e (diff) | |
download | alacritty-f50ca1a54c94fe324d22d985c1acae1ff7c16a80.tar.gz alacritty-f50ca1a54c94fe324d22d985c1acae1ff7c16a80.zip |
Scrollback cleanup
There were some unneeded codeblocks and TODO/XXX comments in the code
that have been removed. All issues marked with TODO/XXX have either been
already resolved or tracking issues exist.
Diffstat (limited to 'src/selection.rs')
-rw-r--r-- | src/selection.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/selection.rs b/src/selection.rs index dca16e26..702599e3 100644 --- a/src/selection.rs +++ b/src/selection.rs @@ -157,8 +157,8 @@ impl Selection { Selection::Semantic { ref region } => { Selection::span_semantic(grid, region) }, - Selection::Lines { ref region, ref initial_line } => { - Selection::span_lines(grid, region, *initial_line) + Selection::Lines { ref region, initial_line } => { + Selection::span_lines(grid, region, initial_line) } } } @@ -253,13 +253,12 @@ impl Selection { // Remove last cell if selection ends to the left of a cell if front_side == Side::Left && start != end { - if front.col != Column(0) { - front.col -= 1; - } // Special case when selection starts to left of first cell - else { + if front.col == Column(0) { front.col = cols - 1; front.line += 1; + } else { + front.col -= 1; } } |