public void resize(int cols) {
		this.cols = cols;
		// NB. Don't forget the characters in the buffer. User may resize back again.
		// TODO: Could/should we re-wrap? Would need to record wraps vs returns, though.
		if (cols <= chars.length) {
			return;
		}
		char[] newChars = new char[cols];
		VtAttributes[] newCellAttrs = new VtAttributes[cols];
		System.arraycopy(chars, 0, newChars, 0, Math.min(cols, chars.length));
		System.arraycopy(cellAttrs, 0, newCellAttrs, 0, Math.min(cols, cellAttrs.length));
		this.chars = newChars;
		this.cellAttrs = newCellAttrs;
	}
Resize the line to the given maximum character count

@param cols the maximum number of characters
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/terminal/vt/VtLine.java