mirror of
https://github.com/wez/wezterm.git
synced 2024-12-25 22:33:52 +03:00
Really avoid underflow with apt
scrolling
I thought I took care of this in 7c0536f9a3
,
but I misunderstood how saturating_sub works. I still need to clamp
it within range.
This commit is contained in:
parent
f4d3ea6e05
commit
b81fb73c37
@ -369,8 +369,8 @@ impl<'a> CSIParser<'a> {
|
||||
&[top, bottom] => {
|
||||
self.advance_by(2, params);
|
||||
Some(CSIAction::SetScrollingRegion {
|
||||
top: top.saturating_sub(1),
|
||||
bottom: bottom.saturating_sub(1),
|
||||
top: top.saturating_sub(1).max(0),
|
||||
bottom: bottom.saturating_sub(1).max(0),
|
||||
})
|
||||
}
|
||||
&[] => {
|
||||
|
Loading…
Reference in New Issue
Block a user