csiDeleteHandler function

void csiDeleteHandler(
  1. CSI csi,
  2. Terminal terminal
)

Implementation

void csiDeleteHandler(CSI csi, Terminal terminal) {
  var count = 1;

  if (csi.params.isNotEmpty) {
    count = csi.params.first;
  }

  if (count < 1) {
    count = 1;
  }

  terminal.buffer.deleteChars(count);
}