@Nullable
	private IntRange scanAt(int pos) {
		String text = codeArea.getText();
		if (pos < 0 || pos >= text.length())
			return null;

		char c = text.charAt(pos);
		char openChar;
		char closeChar;
		boolean forward;
		if (c == '{' || c == '}') {
			openChar = '{';
			closeChar = '}';
			forward = c == '{';
		} else if (c == '[' || c == ']') {
			openChar = '[';
			closeChar = ']';
			forward = c == '[';
		} else if (c == '(' || c == ')') {
			openChar = '(';
			closeChar = ')';
			forward = c == '(';
		} else {
			// Not a supported bracket pair
			return null;
		}

		return forward ? scanForwards(text, pos, openChar, closeChar) :
				scanBackwards(text, pos, openChar, closeChar);
	}
@param paragraph
		Paragraph index, which is {@code line - 1}.

@return {@code true} when the line belongs to the {@link #getRange() selected bracket pair range}.
recaf-ui/src/main/java/software/coley/recaf/ui/control/richtext/bracket/SelectedBracketTracking.java