             return
           }
 
+          let possibleNewRowStart = self.doScroll(values)
+          rowStart = min(possibleNewRowStart, rowStart)
           recompute = true
-          rowStart = min(self.doScroll(values), rowStart)
 
         @unknown default:
           self.log.error("Unknown flush data type")

      self.ugrid.markCell(at: self.markedPosition)
    }

    let oldRowContainsWideChar = self.ugrid.cells[row][startCol..<endCol]
                                   .first(where: { $0.string.isEmpty }) != nil
    let newRowContainsWideChar = chunk.first(where: { $0.isEmpty }) != nil

    if !oldRowContainsWideChar && !newRowContainsWideChar {
      return (false, row)
    }

    return (newRowContainsWideChar, row)
  }

  private func doGoto(position: Position, textPosition: Position) {

        }
      }

      guard recompute else { return }
      self.ugrid.recomputeFlatIndices(
        rowStart: rowStart,
        rowEndInclusive: self.ugrid.size.height - 1
      )
    }
  }

