Commit a0719bbe authored by Carlos Alves's avatar Carlos Alves Committed by Tomaz Canabrava
Browse files

Adjust minimal line and column

Reflow does not work when columns < 17 and/or lines < 3.
Seems to me there is a conflict of the window pixels size limit, the
columns that it can paint within those limits and the mouse position
when adjusting to the minimal window size.
parent 14601a86
......@@ -372,11 +372,14 @@ void Screen::resizeImage(int new_lines, int new_columns)
if ((new_lines == _lines) && (new_columns == _columns)) {
return;
}
// set min values of columns and lines here
new_columns = (17 < new_columns)? new_columns : 17; // FIXME: bug when column <= 16
new_lines = (3 < new_lines)? new_lines : 3; // FIXME: bug when lines <= 2
// First join everything.
int currentPos = 0;
int count_needed_lines = 0;
while (currentPos < _screenLines.count() - 1) {
while (currentPos < _cuY && currentPos < _screenLines.count() - 1) {
// if the line have the 'LINE_WRAPPED' property, concat with the next line and remove it.
if ((_lineProperties[currentPos] & LINE_WRAPPED) != 0) {
_screenLines[currentPos].append(_screenLines[currentPos + 1]);
......
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