Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find in Files filter length limit #14904

Open
ianfailing opened this issue Mar 25, 2024 · 1 comment
Open

Find in Files filter length limit #14904

ianfailing opened this issue Mar 25, 2024 · 1 comment

Comments

@ianfailing
Copy link

ianfailing commented Mar 25, 2024

Description of the Issue

The "Filters" of the "Find in Files" seems to have an arbitrary, soft, hidden maximum length of 512 characters. When that length is exceeded and a search is conducted, NP++ freezes momentarily, silently fails to search, and alters the input value of the Filter string.

Steps to Reproduce the Issue

Fresh install of v8.6.4 64-bit.
Perform a Find in Files search with the below parameters. This fails after five seconds, after searching 0 files, replacing the "Filters:" string with its left 512 bytes (which is unlikely to itself be a valid "Filters:" string).

Find what: a
Directory: c:\
Filters (user-input):
* !*.00 !*.1 !*.264 !*.aab !*.akm !*.aks !*.ami !*.aot !*.appx !*.asar !*.assets !*.bak !*.baml !*.bdf !*.bgf !*.bif !*.bik_atlas !*.bim !*.bin !*.blend !*.blg !*.bny !*.boo !*.bpl !*.bqf !*.bqy !*.bsave !*.bufr !*.bundle !*.bws !*.bxy !*.bz2 !*.cache !*.chm !*.ctx !*.cubin !*.cur !*.dat !*.db !*.dcp !*.dcu !*.dde !*.dlf !*.dll !*.dm !*.dmg !*.dmp !*.dmt !*.dpl !*.dsm !*.dylib !*.ems !*.ess !*.exe !*.exp !*.exr !*.fb1 !*.fb2 !*.fcm !*.flx !*.gbf !*.gif !*.gpl !*.grib !*.hdr !*.icns !*.ico !*.ilk !*.ipch !*.jar !*.jmod !*.jpg !*.lib !*.lsb !*.lw !*.mag !*.manifest !*.mb !*.mdf !*.mf4 !*.mo !*.mov !*.mp4 !*.neta !*.nupkg !*.obj !*.oca !*.oct !*.odb !*.p !*.pak !*.pbi !*.pbo !*.pbt !*.pch !*.pdb !*.pdf !*.pem !*.pfb !*.pib !*.pld !*.png !*.po !*.ppo !*.pxd !*.pyc !*.pyd !*.qq !*.rbf !*.res !*.resource !*.ress !*.rqf !*.sbn !*.sea !*.shk !*.so !*.sqlite !*.srpm !*.sse !*.suo !*.svg !*.tif !*.tpa !*.tpb !*.uhs !*.vdb !*.vpk !*.vsidx !*.vtz !*.whl !*.woff2 !*.wps !*.wsuo !*.x3db !*.xcf !*.xls !*.xlsx !*.zbf !*.zip

Filters field (after one search attempt):
* !*.00 !*.1 !*.264 !*.aab !*.akm !*.aks !*.ami !*.aot !*.appx !*.asar !*.assets !*.bak !*.baml !*.bdf !*.bgf !*.bif !*.bik_atlas !*.bim !*.bin !*.blend !*.blg !*.bny !*.boo !*.bpl !*.bqf !*.bqy !*.bsave !*.bufr !*.bundle !*.bws !*.bxy !*.bz2 !*.cache !*.chm !*.ctx !*.cubin !*.cur !*.dat !*.db !*.dcp !*.dcu !*.dde !*.dlf !*.dll !*.dm !*.dmg !*.dmp !*.dmt !*.dpl !*.dsm !*.dylib !*.ems !*.ess !*.exe !*.exp !*.exr !*.fb1 !*.fb2 !*.fcm !*.flx !*.gbf !*.gif !*.gpl !*.grib !*.hdr !*.icns !*.ico !*.ilk !*.ipch !*

Expected Behavior

Whole-drive full-text search excluding many binary file types.

Actual Behavior

NP++ freezes for five seconds, then displays Search Results: Search "a" (0 hits in 0 files of 0 searched) [Normal]

Debug Information

Notepad++ v8.6.4 (64-bit)
Build time : Feb 20 2024 - 00:12:59
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
OS Name : Windows 11 Home (64-bit)
OS Version : 24H2
OS Build : 26080.1400
Current ANSI codepage : 1252
Plugins :
mimeTools (3.1)
NppConverter (4.6)
NppExport (0.4)

@klaus101
Copy link

klaus101 commented Apr 5, 2024

That would bring me back to an older proposal about “exclude binaries from search” (as long as there is no reliable builtin mechanism to detect):

  • to introduce a dedicated negative list “extensions to ignore”
  • with a simplified syntax:
File exensions to ignore:
exe,dll,dcu,zip,rar,ttf,chm,pdf,xls,png,ico,jpg,gif,bmp,svg,tga   // and so on

See #12342.

OkOkOk, of course same max-length would apply, if any.
But that area could be used more efficiently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants