Prevent crashes upon startup and/or new tab when using input methods

TerminalDisplay::inputMethodQuery causes crashes when using non-standard
input methods.   Qt::ImSurroundingText was trying to use lineProperties
of the current line, but this parameter is ignored in decodeLine anyway.

Thanks to Takahiro Hashimoto kenya888 gmail com for report, research
and patch

BUG: 341798
wilder-portage
Kurt Hindenburg 11 years ago
parent b4ccd90fcd
commit 7986af1d25
  1. 2
      src/TerminalDisplay.cpp

@ -2827,7 +2827,7 @@ QVariant TerminalDisplay::inputMethodQuery(Qt::InputMethodQuery query) const
QTextStream stream(&lineText);
PlainTextDecoder decoder;
decoder.begin(&stream);
decoder.decodeLine(&_image[loc(0, cursorPos.y())], _usedColumns, _lineProperties[cursorPos.y()]);
decoder.decodeLine(&_image[loc(0, cursorPos.y())], _usedColumns, LINE_DEFAULT);
decoder.end();
return lineText;
}

Loading…
Cancel
Save