1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 15:04:36 +03:00

fixup boundary condition for MoveBackwardZoneOfType

refs: #2346
This commit is contained in:
Wez Furlong 2022-08-20 07:35:28 -07:00
parent cb75b642f7
commit 429c18b7ee

View File

@ -801,9 +801,15 @@ impl CopyRenderable {
while delta != 0 {
if step > 0 {
idx = idx.saturating_add(1);
idx = match idx.checked_add(1) {
Some(n) => n,
None => return,
};
} else {
idx = idx.saturating_sub(1);
idx = match idx.checked_sub(1) {
Some(n) => n,
None => return,
};
}
let zone = match zones.get(idx) {
Some(z) => z,