Skip to content

[BUG] Search in Files in notepad++ does not find updated files' contents of un-refreshed opened tabs #17070

@steepiest

Description

@steepiest

Is there an existing issue for this?

  • I have searched the existing issues

Description of the Issue

When I have files that are already opened in notepad++ as a tab, but they are not the active tab, it is known that notepad++ will refresh the contents of the file to represent its updated contents only once that file's tab becomes active.

Now what happens if the contents of the file were changed using some other tool, like regular notepad (not notepad++)? It seems that the Search In Files feature, when it traverses a file (in a specified folder) that is an existing tab in notepad++, it only sees the un-updated version of that file. Only once you click on the tab of that file and make notepad++ refresh this file's contents to represent what's actually on it, will the Search In Files find the newly added text in the updated version of the file.

It seems weird that notepad++ will search for all files in the folder by actually reading from disk, but be lazy and not read from disk for files that are in opened tabs, since their contents are in working memory. For this feature to work for me as expected (search in the actual updated contents of all files) would require me to every time go through all notepad++ tabs (suppose I have many tabs) before I do any such search.

Steps To Reproduce

  1. Open some file.txt as a new tab in notepad++ and then go back to a previous tab so that file.txt is not active (make sure you don't activate this tab while doing the rest of the steps below).
  2. Modify file.txt from a different text editing software, such as regular notepad; add some unique text that was not in the original contents of the file.
  3. use Search in Files feature to search for the unique text you added to the file.

Current Behavior

Unique text added is not found.

Expected Behavior

Unique text added should be found.

Debug Information

Notepad++ v8.8.5   (64-bit)
Build time: Aug 14 2025 - 00:32:39
Scintilla/Lexilla included: 5.5.7/5.4.5
Boost Regex included: 1_85
Path: C:\Program Files\Notepad++\notepad++.exe
Command Line: "C:\Program Files\Notepad++\change.log" 
Admin mode: OFF
Local Conf mode: OFF
Cloud Config: OFF
Periodic Backup: ON
Placeholders: OFF
Scintilla Rendering Mode: SC_TECHNOLOGY_DEFAULT (0)
Multi-instance Mode: monoInst
asNotepad: OFF
File Status Auto-Detection: cdEnabledNew (for current file/tab only)
Dark Mode: OFF
Display Info:
    primary monitor: 1920x1080, scaling 125%
    visible monitors count: 2
    installed Display Class adapters: 
        0000: Description - Intel(R) Iris(R) Xe Graphics
        0000: DriverVersion - 32.0.101.5972
OS Name: Windows 10 Pro (64-bit)
OS Version: 22H2
OS Build: 19045.6332
Current ANSI codepage: 1252
Plugins: 
    mimeTools (3.1)
    NppConverter (4.6)
    NppExport (0.4)

Anything else?

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions