summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/term/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'alacritty_terminal/src/term/mod.rs')
-rw-r--r--alacritty_terminal/src/term/mod.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs
index ae1d7151..b2184ad9 100644
--- a/alacritty_terminal/src/term/mod.rs
+++ b/alacritty_terminal/src/term/mod.rs
@@ -984,7 +984,12 @@ impl<T> Term<T> {
if is_block {
for line in (end.line + 1..=start.line).rev() {
- res += &(self.line_to_string(line, start.col..end.col, start.col.0 != 0) + "\n");
+ res += &self.line_to_string(line, start.col..end.col, start.col.0 != 0);
+
+ // If the last column is included, newline is appended automatically
+ if end.col != self.cols() - 1 {
+ res += "\n";
+ }
}
res += &self.line_to_string(end.line, start.col..end.col, true);
} else {