public int clampedCaret() {
			return clamp(0, caret, text.length());
		}
The current state of a linked field, stored separately from the actual component
Ghidra/Framework/Docking/src/main/java/docking/widgets/textfield/TextFieldLinker.java