Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.98.2
- OS Version: MacOS Sequoia Version 15.3.2
Currently, the CustomEditor
is launched for all *.js
files. As a result, when opening a file from the search panel or GitLens, the CustomEditor
is triggered.
To prevent this, we need the getContext
API to check whether the file is being opened from the search panel before launching the editor.
Alternatively, if a when
clause could be added to the customEditor
configuration, it would help resolve the issue. For example:
"customEditors": [
{
"viewType": "builder.BasicTextEditor",
"displayName": "Basic Text Editor",
"selector": [
{
"filenamePattern": "*.js"
}
],
"priority": "default"
}
]
If the when
clause is supported, I could use the following condition to control when the editor opens:
"when": "sideBarFocus && activeViewlet !== 'workbench.view.search'"
There is already an open issue for this, and I urgently need a fix for my product. If there is any workaround to retrieve the context
, that would also be helpful.
I also noticed that a getContext
API request has already been raised in the following issue:
#10471
Would appreciate any guidance or possible workarounds. Thanks!