diff options
author | Christian Duerr <contact@christianduerr.com> | 2020-01-15 17:36:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-15 17:36:33 +0100 |
commit | 7d1edf01c2d16eedbbfb652b1e57db0f819f12c0 (patch) | |
tree | f44acb48c984076c0f9cc727d1ffd5cb8e5defed /alacritty_terminal/src/selection.rs | |
parent | 7dc406252b06a19b8d5c4f2a2fdebe90a5ad65e2 (diff) | |
download | alacritty-7d1edf01c2d16eedbbfb652b1e57db0f819f12c0.tar.gz alacritty-7d1edf01c2d16eedbbfb652b1e57db0f819f12c0.zip |
Expand line selection across wrapped lines
Diffstat (limited to 'alacritty_terminal/src/selection.rs')
-rw-r--r-- | alacritty_terminal/src/selection.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/alacritty_terminal/src/selection.rs b/alacritty_terminal/src/selection.rs index 6e6dd9c8..1c747d99 100644 --- a/alacritty_terminal/src/selection.rs +++ b/alacritty_terminal/src/selection.rs @@ -317,14 +317,14 @@ impl Selection { Some(Span { start, end, is_block: false }) } - fn span_lines<T>(term: &T, mut start: Point<isize>, mut end: Point<isize>) -> Option<Span> + fn span_lines<T>(term: &T, start: Point<isize>, end: Point<isize>) -> Option<Span> where - T: Dimensions, + T: Search, { - end.col = term.dimensions().col - 1; - start.col = Column(0); + let start = term.line_search_left(start.into()); + let end = term.line_search_right(end.into()); - Some(Span { start: start.into(), end: end.into(), is_block: false }) + Some(Span { start, end, is_block: false }) } fn span_simple<T>( |