Skip to content

Find-in-Files "Filters" box of ONLY "exclusion" items finds no matches; should auto-add *.* #8169

@sasumner

Description

@sasumner

Description of the Issue

Notepad++ 7.8.2 added the ability to use "exclusion" specs in the Filters box for Find in Files.

Example: Put !*.log in Filters to exclude files ending with .log from the search. Multiple exclusion specs can be used, such as !*.log !*.obj to suppress searching of log and object files.

However, as pointed out here:

https://community.notepad-plus-plus.org/topic/18609/question-regarding-new-find-in-files-filter-excluding-ability-in-version-7-8-2

using only "exclusion" specs results in no possible matches.

The technique that works is to put *.* !*.log in the Filters box. Note the addition of the *.*

But, one can leave the Filters box totally empty and the effective filter spec will be *.*, so why shouldn't the case of "only exclusion filters" also infer a *.*?

Steps to Reproduce the Issue

  1. Perform any Find in Files search leaving the Filters box empty. Note results; the assumption is that you search for something that will generate some number of hits.
    1a. Note also that after the search, Notepad++ has put *.* in the Filters box for you. How nice.
  2. Remove the *.* and put only !*.zzz in the Filters box, where zzz is any file extension that you don't have present in the directory tree of the search.
  3. Run the Find in Files search again.

Expected Behavior

I expected the same hits from the search in step 3 as were obtained in step 1.

Actual Behavior

No hits occur, i.e. (0 hits in 0 files) .

BOTTOM LINE FOR THIS ISSUE: Using only "exclusion" specs in the Filters box should result in a search of all files except the exclusion matches.

Debug Information

Notepad++ v7.8.6 (32-bit)
Build time : Apr 21 2020 - 15:17:06
Path : C:.............\npp.7.8.6.bin\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1809
OS Build : 17763.1039
Plugins : mimeTools.dll NppConverter.dll NppExport.dll

Metadata

Metadata

Assignees

Labels

enhancementProposed enhancements of existing features

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions