findNextMatch(cursorPosition) {
		for (let i = 0; i < this.matches.length; i++) {
			if (this.matches[i].index > cursorPosition) {
				return i;
			}
		}
		// If there are no matches after the cursor position, return -1
		return -1;
	}
Finds the index of the next match after the given cursor position.

@param {number} cursorPosition - The current cursor position.
@returns {number} - The index in the matches array or -1 if not found.