termwiz: fixup sixel width calculation

@yoichi reports that:

```bash
printf "\x1bPqh"
```

would panic wezterm; the issue was that the maximum x value was
only being updated for newlines and that sequence didn't include it.

refs: #217
This commit is contained in:
Wez Furlong committed 2020-11-12 10:01:33 -08:00
1 parent c3c9ed881c
commit 04218bb877
1 file changed
+4 -2
+4 -2
View File
@@ -235,11 +235,13 @@ impl Sixel {
match d {
SixelData::Data(_) => {
max_y = max_y.max(rows * 6);
x += 1
x += 1;
max_x = max_x.max(x);
}
SixelData::Repeat { repeat_count, .. } => {
max_y = max_y.max(rows * 6);
x += repeat_count
x += repeat_count;
max_x = max_x.max(x);
}
SixelData::SelectColorMapEntry(_)
| SixelData::DefineColorMapRGB { .. }