setWindowSize method

void setWindowSize(
  1. Size size
)

Implementation

void setWindowSize(Size size) {
  final int row = size.height ~/ theme!.characterHeight!;
  // 列数
  final int column = size.width ~/ theme!.characterWidth!;
  this.row = row;
  this.column = column;
  // log('setPtyWindowSize $size row:$row column:$column');
  currentBuffer!.setViewPoint(row);
  //也就是说如果终端有10列,这10列都能显示东西,但是 `stty size` 命令拿到的列应该是 9
  _debouncer.call(sizeChangedCall);
  needBuild();
  execAutoScroll();
  notifyListeners();
}