protected void appendChar(byte c) {
		int limit = lineBuf.limit();
		if (lineBuf.position() == limit) {
			lineBuf.limit(limit + 1);
		}
		lineBuf.put(c);
	}
There's not really a good way to know if any trailing space was intentional. For GDB/MI, that
doesn't really matter.
Ghidra/Framework/Pty/src/main/java/ghidra/pty/windows/AnsiBufferedInputStream.java