From 5a3280e8e0184c94e7a3f0a89676090d0694408d Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sun, 15 Jan 2023 22:53:41 +0000 Subject: Preserve last column with erase in line right When the erase in line escape sequence with a parameter of 0 (right) is passed while the wrapline flag is already set, it will no longer clear the last column and instead ignore the operation. The behavior of `\e[1K` and `\e[2K` is unchanged and both will clear the entire first line without clearing the wrapline flag. Closes #6159. --- alacritty_terminal/src/term/mod.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'alacritty_terminal/src/term/mod.rs') diff --git a/alacritty_terminal/src/term/mod.rs b/alacritty_terminal/src/term/mod.rs index 98f76d52..e41120da 100644 --- a/alacritty_terminal/src/term/mod.rs +++ b/alacritty_terminal/src/term/mod.rs @@ -1458,6 +1458,7 @@ impl Handler for Term { let point = cursor.point; let (left, right) = match mode { + ansi::LineClearMode::Right if cursor.input_needs_wrap => return, ansi::LineClearMode::Right => (point.column, Column(self.columns())), ansi::LineClearMode::Left => (Column(0), point.column + 1), ansi::LineClearMode::All => (Column(0), Column(self.columns())), -- cgit v1.2.3-54-g00ecf