From efbafbc22904874fb9addcf558d2c935439c68de Mon Sep 17 00:00:00 2001 From: Wanchang Ryu Date: Thu, 9 May 2024 21:11:38 +0900 Subject: [PATCH] fix wrapped long line copy problem on tmux wezterm ignores wrapped long line when alt screen is used and tmux uses alt screen that makes copying wrapped long line into multiple lines. After testing on sevaral tui apps like tmux, w3m, htop it seems to show reasonable performance on resizing. Fixes #5283 --- term/src/terminalstate/performer.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/term/src/terminalstate/performer.rs b/term/src/terminalstate/performer.rs index 80f9d6dd2..59c043319 100644 --- a/term/src/terminalstate/performer.rs +++ b/term/src/terminalstate/performer.rs @@ -162,14 +162,13 @@ impl<'a> Performer<'a> { } } - let should_mark_wrapped = !is_alt - && (!is_conpty - || screen - .line_mut(y) - .visible_cells() - .last() - .map(|cell| makes_sense_to_wrap(cell.str())) - .unwrap_or(false)); + let should_mark_wrapped = !is_conpty + || screen + .line_mut(y) + .visible_cells() + .last() + .map(|cell| makes_sense_to_wrap(cell.str())) + .unwrap_or(false); if should_mark_wrapped { screen.line_mut(y).set_last_cell_was_wrapped(true, seqno); }