From 96aa706040e6a7e442a78db4b84f253d28317144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Tue, 8 Feb 2022 22:39:15 +0100 Subject: [PATCH] More customizable url when opening an external editor --- .../browser/extension/options/EditorGroup.tsx | 31 +------- .../browser/extension/options/syncOptions.ts | 9 +-- .../src/openFile.ts | 78 +++++++------------ 3 files changed, 34 insertions(+), 84 deletions(-) diff --git a/extension/src/browser/extension/options/EditorGroup.tsx b/extension/src/browser/extension/options/EditorGroup.tsx index 130ef824..dd981e10 100644 --- a/extension/src/browser/extension/options/EditorGroup.tsx +++ b/extension/src/browser/extension/options/EditorGroup.tsx @@ -47,37 +47,12 @@ export default ({ options, saveOption }: OptionsProps) => { id="editor" type="text" size={33} - maxLength={30} - placeholder="vscode, atom, webstorm, sublime..." - value={options.editor} + placeholder={'vscode://file/{path}:{line}:{column}'} + value={options.editorURL} disabled={options.useEditor !== EditorState.EXTERNAL} - onChange={(e) => - saveOption('editor', e.target.value.replace(/\W/g, '')) - } + onChange={(e) => saveOption('editorURL', e.target.value)} /> -
- -
-