This line breaks if the previous jump position was deleted. `curMark` will still exist but `curMark.find()` returns `undefined`. Could you add a check for that?