Global Search not finding provided text

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Hello, When using the global search functionality for certain text, the provided text is only found whenever the file containing it is open (current tab or lives in the open tab list).
But if the file was never opened or opened and closed, the text is never found as if the file containing it is never scanned.

I want to provide 3 screenshots in this topic, two with the tab open (current or listed) and the third with the tab closed, as you can see the text I am searching for is never found.
But it seems whenever i upload a screenshot i replaces the existing one, so i uploaded the third screenshot only. I will reply with one of the first two screenshots.

Steps to Reproduce

Search for specific text existing in an unopened file it won’t find it, then open the file and search for the same text and it will work.

Expected Behavior

The global search is supposed to scan all files (unopened also) for the provided search text.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 2.4.31 (system setup)
VSCode Version: 1.105.1
Commit: 3578107fdf149b00059ddad37048220e41681000
Date: 2026-02-08T07:42:24.999Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Windows_NT x64 10.0.19045

Does this stop you from using Cursor

No - Cursor works, but with this issue

1 Like

Here is a screenshot with the file open:

Hey, thanks for the report. Looks like you’re seeing the same issue as in this thread: Global search only works on open files. In that post they cover the exact same case, search only returns results from open tabs.

You’re on x64, so the root cause might be different, but let’s narrow it down:

  1. Open Developer Tools (Help > Toggle Developer Tools > Console tab) and run a search that returns no results. Check for errors, especially anything mentioning “search provider” or “ripgrep”. Please share a screenshot of the Console output.

  2. Try Safe Mode. Fully close Cursor, then run cursor --disable-extensions from a terminal. Does search work in that mode?

  3. Check the “files to include” and “files to exclude” fields in the Search panel, and make sure your .gitignore isn’t excluding the files you want.

If the Console shows a ripgrep error, the workaround from that thread might help (installing the VC++ Redistributable or replacing rg.exe). But first, let’s see what your Console shows.

Let me know what you find.

Hi, thank you for the quick reply.

No errors appear in the Console when the search returns no results.

I tried running it with all extensions disabled and still no result and no console error or warning.

it isn’t a gitignore issue either.

UPDATE NOTE: i am on x64-based PC and not ARM64 (i took a quick look onto the topic you linked)

Any update on the issue ?
Anyone else having this problem on x64 ?

Hey, sorry for the delay. Since you’re on x64, the ARM64 workaround from that thread won’t apply directly, but the root cause might be the same, ripgrep silently not working.

Try these two steps:

  1. Install the x64 VC++ Redistributable:
    https://aka.ms/vc14/vc_redist.x64.exe
    After installing, fully close and reopen Cursor.

  2. If that doesn’t help, check ripgrep manually:
    Open a terminal and run:

"C:\Program Files\cursor\resources\app\node_modules\@vscode\ripgrep\bin\rg.exe" --version

(The path may differ if Cursor is installed per user. In that case, look under %LOCALAPPDATA%\Programs\cursor\...)

If rg.exe doesn’t print a version or crashes with an error, that confirms the issue. In that case, you can replace it with a working ripgrep copy from the GitHub releases. Download ripgrep-*-x86_64-pc-windows-msvc.zip, rename the old rg.exe, and put the new one in its place.

Let me know what you find.

Hey, I got the same problem fow a month. I am so happy to find someone solving this :kissing_face: .

Also on x64, follow your solution, I installed `VC++ Redistributable` and restarted my computer, but it doesn’t work.

when I try rg.exe, I found an interesting phenomenon(I have downloaded the newest version):

  1. when it’s name is rg.exe, it doesn’t work.

image

  1. when I rename it(what ever), it prints information.

Hey @DrizzleSh this is a really interesting find. The fact that renaming rg.exe to anything else makes it work strongly suggests something external is intercepting or blocking the process by name. This is typical behavior for antivirus software, Windows Application Compatibility shims, or security policies.

A few things to check:

  1. Antivirus / security software
    Check if your antivirus (Windows Defender, or any third-party AV) has a rule or quarantine entry targeting rg.exe. Some AVs silently block executables by name. Try adding the Cursor installation folder to your AV’s exclusion list.

  2. Windows Application Compatibility Database
    Open regedit and check:

    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\rg.exe
    

    If that key exists, it means something has set a debugger or compatibility shim on rg.exe. Delete that key and restart Cursor.

  3. Workaround
    Since renaming works, you can use a downloaded ripgrep as a replacement:

    • Download ripgrep-*-x86_64-pc-windows-msvc.zip from the GitHub releases: Releases · BurntSushi/ripgrep · GitHub
    • Go to: D:\software\cursor\resources\app\node_modules\@vscode\ripgrep\bin\
    • Rename the existing rg.exe to rg_backup.exe
    • Copy the downloaded rg.exe into that folder

The new binary might not be affected by whatever is blocking the current one.

Let me know what you find, especially if the registry key exists. That would confirm the root cause.