@Override
	public void selectionChanged(FieldSelection selection, EventTrigger trigger) {
		selectedText = getSelectedText();
		clipboardProvider.selectionChanged(selection);
	}
Don't just blow away the selection every key stroke; however, don't allow terminal
changes to modify the selected text without the user knowing. That rule is directly
implemented here. If the selected text changes, destroy the selection.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/terminal/TerminalPanel.java