Skip to content

Commit

Permalink
fix wrapped long line copy problem on tmux
Browse files Browse the repository at this point in the history
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
  • Loading branch information
eternity74 committed May 9, 2024
1 parent 0b50725 commit 06513a7
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions term/src/terminalstate/performer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 06513a7

Please sign in to comment.