Skip to content

Commit

Permalink
feat: support wezterm
Browse files Browse the repository at this point in the history
The wezterm Terminfo handles CSI 3J correctly only within the XtermClear
sequence.
  • Loading branch information
Omar El Halabi committed May 20, 2024
1 parent c1482c2 commit ea83162
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,13 @@ impl Default for ClearScreen {

// - screen supports CSI 3J only within the XtermClear sequence, without E3 capability.
// - Konsole handles CSI 3J correctly only within the XtermClear sequence.
// - Wezterm handles CSI 3J correctly only within the XtermClear sequence.
// - assume tmux TERMs are only used within tmux, and avoid the requirement for a functioning terminfo then
if term.starts_with("screen") || term.starts_with("konsole") || term.starts_with("tmux") {
if term.starts_with("screen")
|| term.starts_with("konsole")
|| term == "wezterm"
|| term.starts_with("tmux")
{
return Self::XtermClear;
}

Expand Down

0 comments on commit ea83162

Please sign in to comment.