Skip to content

Commit

Permalink
custom-editor: update opener to respect option
Browse files Browse the repository at this point in the history
The commit updates the `custom-editor` to respect the `option` priority
which is used to control the opener behavior. Plugins may set their
priority to `option` which will not open the custom-editor by default,
and instead default to the regular opener (editor). The custom-editor
should still be a valid opener, when they perform `opens with...`.

Signed-off-by: vince-fugnitto <[email protected]>
  • Loading branch information
vince-fugnitto committed Sep 28, 2021
1 parent 6a1b815 commit 530469e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ export class CustomEditorOpener implements OpenHandler {
switch (this.editor.priority) {
case CustomEditorPriority.default: return 500;
case CustomEditorPriority.builtin: return 400;
case CustomEditorPriority.option: return 300;
/** `option` should not open the custom-editor by default. */
case CustomEditorPriority.option: return 1;
default: return 200;
}
}
Expand Down

0 comments on commit 530469e

Please sign in to comment.