Merge pull request #963 from tamuratak/add_flag_pdftotex_synctex_animation

add flag for pdf-to-tex synctex animation
This commit is contained in:
James Yu 2018-11-07 11:15:53 +08:00 committed by GitHub
commit d1b26d0fec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -679,6 +679,11 @@
"default": false,
"description": "Execute forward synctex at cursor position after compiling LaTeX project."
},
"latex-workshop.synctex.pdfToTex.animation": {
"type": "boolean",
"default": "true",
"description": "Animate to notify the position of the cursor after executing pdf-to-tex synctex."
},
"latex-workshop.chktex.enabled": {
"type": "boolean",
"default": false,

View File

@ -193,7 +193,11 @@ export class Locator {
vscode.window.showTextDocument(doc, viewColumn).then((editor) => {
editor.selection = new vscode.Selection(pos, pos)
vscode.commands.executeCommand('revealLine', {lineNumber: row, at: 'center'})
this.animateToNotify(editor, pos)
const configuration = vscode.workspace.getConfiguration('latex-workshop')
const flag = configuration.get('synctex.pdfToTex.animation') as boolean
if (flag) {
this.animateToNotify(editor, pos)
}
})
})
}