diff options
author | jeremycostanzo <56163564+jeremycostanzo@users.noreply.github.com> | 2021-12-18 16:18:19 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-18 15:18:19 +0000 |
commit | 8e58409930354c71c102ba7b86d1732b6c053642 (patch) | |
tree | d3093440314f66bf54cf316865e2071e8d2874e3 /alacritty_terminal/src/term/mod.rs | |
parent | 2538c87d3e8f67c1a7c4ef634bcd09a0c77b9879 (diff) | |
download | alacritty-8e58409930354c71c102ba7b86d1732b6c053642.tar.gz alacritty-8e58409930354c71c102ba7b86d1732b6c053642.zip |
Remove trailing whitespace from block selection
Fixes #5638.
Diffstat (limited to 'alacritty_terminal/src/term/mod.rs')
-rw-r--r-- | alacritty_terminal/src/term/mod.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs index 2908aadb..820d8bd9 100644 --- a/alacritty_terminal/src/term/mod.rs +++ b/alacritty_terminal/src/term/mod.rs @@ -354,14 +354,16 @@ impl<T> Term<T> { if is_block { for line in (start.line.0..end.line.0).map(Line::from) { - res += &self.line_to_string(line, start.column..end.column, start.column.0 != 0); + res += self + .line_to_string(line, start.column..end.column, start.column.0 != 0) + .trim_end(); // If the last column is included, newline is appended automatically. if end.column != self.columns() - 1 { res += "\n"; } } - res += &self.line_to_string(end.line, start.column..end.column, true); + res += self.line_to_string(end.line, start.column..end.column, true).trim_end(); } else { res = self.bounds_to_string(start, end); } |