尝试适配Windows
This commit is contained in:
parent
9335308973
commit
5199bada00
1 changed files with 1 additions and 8 deletions
|
@ -29,13 +29,6 @@ function activate(context) {
|
||||||
if (!type_list.includes("Res")) return;
|
if (!type_list.includes("Res")) return;
|
||||||
const code_line = document.lineAt(position).text;
|
const code_line = document.lineAt(position).text;
|
||||||
const res_range = document.getWordRangeAtPosition(position, /".*?"/);
|
const res_range = document.getWordRangeAtPosition(position, /".*?"/);
|
||||||
// let start, end;
|
|
||||||
// for (start = position.character; start >= 0; --start)
|
|
||||||
// if (code_line.charAt(start) == '"') break;
|
|
||||||
// for (end = position.character; end < code_line.length; ++end)
|
|
||||||
// if (code_line.charAt(end) == '"') break;
|
|
||||||
// let res = code_line.substring(start + 1, end);
|
|
||||||
// console.log(document.getWordRangeAtPosition(position, /".*?"/));
|
|
||||||
let res = code_line.substring(
|
let res = code_line.substring(
|
||||||
res_range.start.character + 1,
|
res_range.start.character + 1,
|
||||||
res_range.end.character - 1
|
res_range.end.character - 1
|
||||||
|
@ -46,7 +39,7 @@ function activate(context) {
|
||||||
vscode.workspace.workspaceFolders[0].uri.path,
|
vscode.workspace.workspaceFolders[0].uri.path,
|
||||||
"mower",
|
"mower",
|
||||||
"resources",
|
"resources",
|
||||||
res
|
...res.split("/")
|
||||||
);
|
);
|
||||||
const md = new vscode.MarkdownString(``);
|
const md = new vscode.MarkdownString(``);
|
||||||
return new vscode.Hover(md);
|
return new vscode.Hover(md);
|
||||||
|
|
Loading…
Add table
Reference in a new issue