protected void doFind(boolean forward) {
		FieldSelection sel = panel.getFieldPanel().getSelection();
		final FieldLocation start;
		if (sel == null || sel.getNumRanges() == 0) {
			start = null;
		}
		else {
			FieldLocation s = sel.getFieldRange(0).getStart();
			if (forward) {
				start = new FieldLocation(s.getIndex(), 0, 0, s.getCol() + 1);
			}
			else {
				/**
				 * The search algorithm should work such that col == -1 works the same as the end of
				 * the previous line -- or no result if its the first line.
				 */
				start = new FieldLocation(s.getIndex(), 0, 0, s.getCol() - 1);
			}
		}
		FieldRange found =
			panel.find(findDialog.txtFind.getText(), findDialog.getOptions(), start, forward);
		if (found == null) {
			OkDialog.showInfo("Find", "String not found");
			return;
		}
		FieldSelection newSel = new FieldSelection();
		newSel.addRange(found);
		panel.fieldPanel.setSelection(newSel);
		panel.fieldPanel.scrollTo(found.getStart());
	}
A window holding a VT100 terminal emulator.

<p>
This also provides UI actions for searching the terminal's contents.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/terminal/TerminalProvider.java