diff --git a/term/src/terminalstate.rs b/term/src/terminalstate.rs index ebacfe6f8..42686d644 100644 --- a/term/src/terminalstate.rs +++ b/term/src/terminalstate.rs @@ -2013,10 +2013,13 @@ impl TerminalState { return; } - // The minimum size of the scrolling region is two columns. + // The minimum size of the scrolling region is two columns per DEC, + // but xterm allows 1. + /* if right - left < 2 { return; } + */ self.left_and_right_margins = left..right + 1; @@ -2535,6 +2538,19 @@ impl<'a> Performer<'a> { ) .ok(); } + &[b's'] => { + // DECSLRM - left and right margins + let margins = self.left_and_right_margins.clone(); + write!( + self.writer, + "{}1$r{};{}s{}", + DCS, + margins.start + 1, + margins.end, + ST + ) + .ok(); + } _ => { log::error!("unhandled DECRQSS {:?}", s); // Reply that the request is invalid