Commit b17c1307 authored by Matan Ziv-Av's avatar Matan Ziv-Av Committed by Tomaz Canabrava
Browse files

Initialize sixel mode even when missing Raster attributes Ph and Pv

Use default Ph=8, Pv=6.
Without this, some sixel commands (ususally the color table
initialization) are not processed.
parent fc45802b
Pipeline #221566 passed with stage
in 2 minutes and 42 seconds
......@@ -2950,7 +2950,7 @@ bool Vt102Emulation::processSixel(uint cc)
}
addArgument();
if (params.count == 4) {
if (params.count == 4 || params.count == 2) {
// We just ignore the pixel aspect ratio, it's dumb
// const int pixelWidth = params.value[0];
// const int pixelHeight = params.value[1];
......@@ -2961,8 +2961,16 @@ bool Vt102Emulation::processSixel(uint cc)
} else {
m_aspect = qMakePair(params.value[0], params.value[1]);
}
const int width = params.value[2];
const int height = params.value[3];
int width;
int height;
if (params.count == 4) {
width = params.value[2];
height = params.value[3];
} else {
// Default size
width = 8;
height = 6;
}
SixelModeEnable(width, height);
}
resetTokenizer();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment