private void replaceResult(int index) {
			String replacement = getReplacement(index);
			CodeArea area = editor.getCodeArea();
			Match match = resultRanges.get(index);
			IntRange range = match.range();
			area.replaceText(range.start(), range.end(), replacement);
		}
Replaces the range in the {@link #resultRanges} at the given {@code index} with the text of {@link #getReplacement(int)}.

@param index
		Index in {@link #resultRanges} to replace.
recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/search/SearchBar.java