Ignore current cursor line

Don't need to reflow the current cursor line. (it will bug and crash)
wilder
Carlos Alves 5 years ago committed by Tomaz Canabrava
parent 2be00da524
commit 4d4d70d616
  1. 6
      src/Screen.cpp

@ -408,15 +408,11 @@ void Screen::resizeImage(int new_lines, int new_columns)
// Then move the data to lines below.
currentPos = 0;
while (currentPos != _screenLines.count()) {
while (currentPos != _screenLines.count() && currentPos != _cuY) {
const bool shouldCopy = _screenLines[currentPos].size() > new_columns;
// Copy from the current line, to the next one.
if (shouldCopy) {
// If we are in the last line, append a new one.
if (currentPos == _screenLines.count() - 1) {
_screenLines.append(ImageLine{});
}
_cuY++;
auto values = _screenLines[currentPos].mid(new_columns);

Loading…
Cancel
Save