private int autoLookupLinear(String text) {
		int max = MAX_SEARCH_ROWS;
		int rows = getRowCount();
		int start = getCurrentRow();
		int counter = 0;
		int col = lookupColumn;

		// first search from the current row until the last row
		for (int i = start + 1; i < rows && counter < max; i++, counter++) {
			if (textMatches(text, i, col)) {
				return i;
			}
		}

		// then wrap the search to be from the beginning to the current row
		for (int i = 0; i < start && counter < max; i++, counter++) {
			if (textMatches(text, i, col)) {
				return i;
			}
		}
		return -1;
	}
Clients call this method when the user types keys

@param e the key event
Ghidra/Framework/Docking/src/main/java/docking/widgets/AutoLookup.java