Skip to content

Commit

Permalink
wezterm: recognize MS terminal mode 25 for cursor visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
wez committed Apr 6, 2020
1 parent 61e3545 commit 5b700e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions term/src/terminalstate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,12 @@ impl TerminalState {
Mode::ResetDecPrivateMode(DecPrivateMode::Code(DecPrivateModeCode::ShowCursor)) => {
self.cursor_visible = false;
}
Mode::SetMode(TerminalMode::Code(TerminalModeCode::ShowCursor)) => {
self.cursor_visible = true;
}
Mode::ResetMode(TerminalMode::Code(TerminalModeCode::ShowCursor)) => {
self.cursor_visible = false;
}

Mode::SetDecPrivateMode(DecPrivateMode::Code(DecPrivateModeCode::MouseTracking))
| Mode::ResetDecPrivateMode(DecPrivateMode::Code(DecPrivateModeCode::MouseTracking)) => {
Expand Down
3 changes: 3 additions & 0 deletions termwiz/src/escape/csi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,12 @@ pub enum TerminalModeCode {
/// https://vt100.net/docs/vt510-rm/IRM.html
Insert = 4,
/// https://vt100.net/docs/vt510-rm/SRM.html
/// But in the MS terminal this is cursor blinking.
SendReceive = 12,
/// https://vt100.net/docs/vt510-rm/LNM.html
AutomaticNewline = 20,
/// MS terminal cursor visibility
ShowCursor = 25,
}

#[derive(Debug, Clone, PartialEq, Eq)]
Expand Down

0 comments on commit 5b700e4

Please sign in to comment.