Skip to content
Snippets Groups Projects
Commit 835fd93c authored by s1995588's avatar s1995588
Browse files

now getting parameters when the extension is opened for the first time

parent b114b525
No related branches found
No related tags found
No related merge requests found
...@@ -164,6 +164,7 @@ ...@@ -164,6 +164,7 @@
let index = tools.findIndex(x => x === oldState.currentTool); let index = tools.findIndex(x => x === oldState.currentTool);
if (index === -1) { if (index === -1) {
index = 0; index = 0;
oldState.currentTool = tools[index];
} }
select.selectedIndex = index; select.selectedIndex = index;
...@@ -278,7 +279,7 @@ ...@@ -278,7 +279,7 @@
vscode.setState({ tools: oldState.tools, documentVars: oldState.documentVars, parameters: parameters, currentUri: oldState.currentUri, currentTool: oldState.currentTool }); vscode.setState({ tools: oldState.tools, documentVars: oldState.documentVars, parameters: parameters, currentUri: oldState.currentUri, currentTool: oldState.currentTool });
} }
// vscode.setState({ tools: [], documentVars: [], parameters: [], currentUri: "", currentTool: "" }); vscode.setState({ tools: [], documentVars: [], parameters: [], currentUri: "", currentTool: "" });
const oldState = vscode.getState() || { tools: [], documentVars: [], parameters: [], currentUri: "", currentTool: "" }; const oldState = vscode.getState() || { tools: [], documentVars: [], parameters: [], currentUri: "", currentTool: "" };
const tools = oldState.tools; const tools = oldState.tools;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment