microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.64k stars 29.05k forks source link

Search finds string in translation file, but not in php file #132271

Closed LorisZ closed 3 years ago

LorisZ commented 3 years ago

Issue Type: Bug

When i searched for a string in the source files, the result was empty. I then included the all folders, but it only found the translation (.po) file. I then used grep to find the file and opened that file (.php) in VSCode and after that the search successfully found the string inside that file. If I close the file and search again, the result disappears again...

Does this issue occur when all extensions are disabled?: Yes

VS Code version: Code 1.60.0 (e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff, 2021-09-01T10:43:02.136Z) OS version: Linux x64 5.11.0-27-generic - Ubuntu 20.04 (KDE neon) Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-10710U CPU @ 1.10GHz (12 x 2434)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|2, 2, 2| |Memory (System)|15.41GB (1.67GB free)| |Process Argv|--unity-launch --crash-reporter-id a4436464-9b4e-4b20-9aec-a68527ad0c3f| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|plasma| |XDG_CURRENT_DESKTOP|KDE| |XDG_SESSION_DESKTOP|KDE| |XDG_SESSION_TYPE|x11|
Extensions (29) Extension|Author (truncated)|Version ---|---|--- vscode-intelephense-client|bme|1.7.1 disableligatures|Coe|0.0.10 gitlens|eam|11.6.0 php-debug|fel|1.17.0 gc-excelviewer|Gra|3.0.43 phpcs|ika|1.0.5 smarty|imp|0.3.0 vscode-peacock|joh|3.9.1 php-constructor|Meh|0.1.2 xml-format|mik|1.1.2 dotenv|mik|1.0.1 easy-less|mrc|1.7.3 vscode-apache|mrm|1.2.0 language-gettext|mro|0.2.0 vscode-docker|ms-|1.16.1 remote-containers|ms-|0.194.0 remote-ssh|ms-|0.65.7 remote-ssh-edit|ms-|0.65.7 remote-wsl|ms-|0.58.2 vscode-remote-extensionpack|ms-|0.21.0 vsliveshare|ms-|1.0.4761 php-docblocker|nei|2.3.0 vscode-php-getters-setters|php|1.2.3 geo-data-viewer|Ran|2.4.0 java|red|0.81.0 tabnine-vscode|Tab|3.4.26 vscode-input-sequence|tom|0.2.0 twig|wha|1.0.2 change-case|wma|1.0.0
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspyt653:30270858 pythonvspyt602:30300191 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyt639:30300192 pythontb:30283811 pythonptprofiler:30281270 vshan820:30294714 vstes263cf:30335440 pythondataviewer:30285071 pythonvsuse255:30340121 vscod805cf:30301675 pythonvspyt200:30340761 vscextlang:30333561 binariesv615:30325510 vsccppwt:30329788 pythonvssor306:30344512 bridge0708:30335490 pygetstartedc2:30360494 bridge0723:30353136 pythonf5test824:30361777 vsdyn420:30356812 pydsgst2:30361792 vscus224:30358039 vssid140:30362080 ```
gjsjohnmurray commented 3 years ago

Please use the guide at https://github.com/microsoft/vscode/wiki/Search-Issues

LorisZ commented 3 years ago

I had the "Search only in Open Editors" Button active. I have no memory of clicking it, but maybe I hit it by accident? Wasn't even really aware of this option.

  1. This is a very hidden button with huge impact on the results
  2. It does not even say anything in the results about it, only "x results in y files" - Could at least mention "x results in y files - only searching open editors"
  3. The link for search issues https://github.com/microsoft/vscode/wiki/Search-Issues does not mention this option at all - in fact it is missing even in the screenshot. Is this a newer feature? Hope it's not active by default...
JacksonKearl commented 3 years ago

Duplicate of #130412