public void forEachLine(boolean includeScrollBack, LineConsumer action) {
		int i = 0;
		if (includeScrollBack) {
			for (VtLine line : scrollBack) {
				action.accept(i, -1, line);
				i++;
			}
		}
		int y = 0;
		for (VtLine line : lines) {
			action.accept(i, y, line);
			i++;
			y++;
		}
	}
Perform an action on each line of terminal text, optionally including the scroll-back buffer.

@param includeScrollBack true to include the scroll-back buffer
@param action the action
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/terminal/vt/VtBuffer.java