AI trying to search entire file instead of just relevant part

Hey everyone, I’m still new to cursor AI so bear with me. I’m subscribed and using the 3.5 sonnet model.
I have a long c# file, and then in the chat window it suggested a fix for a small portion of that code and I click ‘apply’, it searches the entire file instead of just the part it needs to change, even if the part has been fixed already, it continues to search the rest of the file so I have to spend several minutes waiting for it to finish searching the rest of the file to accept it. Is there a fix for this?

And here it is searching the entire file for some reason:

how large is the file?

Hey, 1257 lines though half of it is just declarations lol

I tried moving half of it to another file and it does the same thing. Weirdly it’s fine with another project that uses c++ instead of c# and immediately goes to the correct function instead of scanning the whole file.

Edit: if it helps I get this every time i click apply: “AI did not predict an origin file for this codeblock”