private boolean canClose() {
		boolean hasUserChanges = resultsPanel.hasUserChanges();
		if (!hasUserChanges) {
			return true;
		}

		String message = "Close dialog and lost custom search results?";
		OptionDialogBuilder builder = new OptionDialogBuilder("Close Results Window?", message);
		int choice = builder.addOption("Yes")
				.addCancel()
				.setDefaultButton("Yes")
				.setMessageType(OptionDialog.QUESTION_MESSAGE)
				.show(resultsPanel);

		return choice == OptionDialog.OPTION_ONE;
	}
Performs a scan on the current results, keeping only the results that match the type of scan.
Note: this method is public to facilitate testing.

@param scanner the scanner to use to reduce the results.
Ghidra/Features/Base/src/main/java/ghidra/features/base/memsearch/gui/MemorySearchProvider.java