mirror of
https://github.com/James-Yu/LaTeX-Workshop.git
synced 2024-10-04 15:17:59 +03:00
fix for when tex file is not in workspace root
This commit is contained in:
parent
f2d7574a56
commit
146e53330d
@ -114,7 +114,8 @@ async function onClientMessage(msg) {
|
||||
let row = record["line"] - 1;
|
||||
let pos = new vscode.Position(row, col);
|
||||
|
||||
let doc = await vscode.workspace.openTextDocument(record["input"].replace(/(\r\n|\n|\r)/gm,""));
|
||||
let file = path.join(path.dirname(latex_data.main_document), record["input"].replace(/(\r\n|\n|\r)/gm,""));
|
||||
let doc = await vscode.workspace.openTextDocument(file);
|
||||
let editor = await vscode.window.showTextDocument(doc);
|
||||
editor.selection = new vscode.Selection(pos, pos);
|
||||
await vscode.commands.executeCommand("revealLine", {lineNumber: row, at: 'center'});
|
||||
|
Loading…
Reference in New Issue
Block a user