public String getSelectedText() {
		FieldSelection sel = fieldPanel.getSelection();
		if (sel == null || sel.getNumRanges() != 1) {
			return null;
		}
		return getSelectedText(sel.getFieldRange(0));
	}
Get the text selected by the user

<p>
If the selection is disjoint, this returns null.

@return the selected text, or null
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/terminal/TerminalPanel.java