private void trimHistoryToCurrentIndex() {
		int upcomingIndex = historyIndex + 1; // this is the index value for the pending update
		while (historyStack.size() > upcomingIndex) {
			historyStack.pop();
		}
	}
Returns the number of items in this history list

@return the number of items in this history list
Ghidra/Framework/Generic/src/main/java/util/HistoryList.java