Closed smlombardi closed 6 years ago
Those files must be excluded by a files.exclude
or search.exclude
setting, or your gitignore file. That's what that button controls.
My understanding is that I can exclude items from search on a search-by-search basis by entering a pattern in that field. So I wanted to exclude all files starting with ex.
since I didn't want to work on them at first. Normally they would be found, since they are project files like all the others, so most of the time I want to search them — just not this morning, I wanted to focus on something else first.
The I wanted to search the whole project again, so I cleared out the field. I expected the search to search the whole project, only excepting(of course) what's in my settings file.
But it still was additionally excluding the files starting with ex.
from earlier in the day, I don't see how I could have know that, since there is nothing in the field nor is that pattern in my exclude files.
I expected the search to search the whole project, only excepting(of course) what's in my settings file.
That's right. Most likely, those files are actually excluded by your settings or gitignore. That's probably why they are excluded, not because it remembered the ex.
pattern.
If you don't think that's the case we can see what the actual parameters of the search were if you follow these steps to collect the logs:
https://github.com/Microsoft/vscode/wiki/Search-Issues#filing-a-search-issue
My search exclude settings do not include these files:
"search.exclude": {
"**/.sass-cache": true,
"**/node_modules": true,
"**/bower_components": true,
"build": true
},
nor does files.exclude
"files.exclude": {
"**/.sass-cache": true,
"**/.DS_Store": true,
"**/*.js": {
"when": "$(basename).ts"
},
"**/*.js.map": true
},
They are also not in gitignore. The were only ever excluded because I typed their pattern into the exclude field, which I expected to be temporary and clearing the field would mean the only things excluded would be from the files you mentioned.
Why would search be excluding files that I entered in the field even after I cleared the field?
It may have been a transient issue, since as of today is seems to be functioning as expected again.
If that was what happened, it would be a bug, so let me know if you see it again, and try to collect logs so we can see exactly what happened.
Issue Type: Bug
I was searching for a string in my html files, originally I created an exclusion of
ex.*
to exclude all my files beginning with that, as inex.foo.html
Later, I wanted to search for the string in ALL my html files and couldn't figure out why I wasn't getting any results, even though I new for sure matches existed.
I searched the project with Sublime Text 3 and got many hits. It was then I noticed the "exception" icon was active:
Toggled it off, got the hits:
Should the exception remember the last one I used, even it the field is empty? I would expect that clearing the exceptions field would turn off the toggle button.
VS Code version: Code - Insiders 1.27.0-insider (387c79f8de26cec749415bf400b6e2e99f2e8f14, 2018-08-28T13:04:31.269Z) OS version: Darwin x64 17.7.0
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 x 2800)| |GPU Status|2d_canvas: enabledchecker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|2, 2, 2| |Memory (System)|16.00GB (0.34GB free)| |Process Argv|/Users/st016lo/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron -psn_0_21062677| |Screen Reader|no| |VM|0%|
Extensions (26)
Extension|Author (truncated)|Version ---|---|--- better-comments|aar|1.2.6 Bookmarks|ale|9.0.3 project-manager|ale|8.0.0 bracket-pair-colorizer|Coe|1.0.59 vscode-eslint|dba|1.5.0 tslint|eg2|1.0.38 vscode-great-icons|emm|2.1.41 prettier-vscode|esb|1.6.1 path-autocomplete|ion|1.12.0 svg|joc|0.1.1 ecdc|mit|0.12.0 HTMLHint|mka|0.5.0 theme-monokai-pro-vscode|mon|1.1.8 vscode-scss|mrm|0.6.2 vscode-stylefmt|mrm|2.5.0 debugger-for-chrome|msj|4.8.2 angular2-inline|nat|0.0.17 incrementor|nms|0.1.0 vscode-versionlens|pfl|0.21.1 quicktype|qui|12.0.40 code-settings-sync|Sha|3.1.0 stylelint|shi|0.42.0 rewrap|stk|1.9.1 sort-lines|Tyr|1.7.0 vscode-terminal-here|Tyr|0.1.1 change-case|wma|1.0.0 (2 theme extensions excluded)