Commit 0ecc366c authored by Luis Javier Merino's avatar Luis Javier Merino Committed by Kurt Hindenburg
Browse files

Fix crash on resize while doing other things

Commits 9ffe33a2 and
4352df00 introduce and use a
getScreenLineColumns(line) method to provide support for DECDWL
(Double-Width) lines.

It turns out that under some conditions on resize Screen::_cuY (the
current cursor Y position) and ScreenWindow::endWindowLine() can have
different ideas of how many lines the terminal has.

A test that asserts:

 - while [ true ]; do echo -e "\e[?1047h";  done
 - Resize the window, making it smaller

BUG: 436327
parent d5b290aa
...@@ -717,9 +717,7 @@ QVector<LineProperty> Screen::getLineProperties(int startLine , int endLine) con ...@@ -717,9 +717,7 @@ QVector<LineProperty> Screen::getLineProperties(int startLine , int endLine) con
int Screen::getScreenLineColumns(const int line) const int Screen::getScreenLineColumns(const int line) const
{ {
const int doubleWidthLine = _lineProperties[line] & LINE_DOUBLEWIDTH; if (line < _lineProperties.size() && _lineProperties[line] & LINE_DOUBLEWIDTH) {
if (doubleWidthLine) {
return _columns / 2; return _columns / 2;
} }
......
Markdown is supported
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