message: Fix Support Ctrl+click to open an include file
  The following commands are recognized for including a file
  include, input, subfile
  (sub)?(import|includefrom|inputfrom)
diff: @@ -4,6 +4,7 @@ import * as path from 'path'
  import {Extension} from '../main'
  import {tokenizer} from './tokenizer'
  +import * as utils from '../utils'
  export class DefinitionProvider implements vscode.DefinitionProvider {
  extension: Extension
  @@ -12,6 +13,33 @@ export class DefinitionProvider implements vscode.DefinitionProvider {
  this.extension = extension
  }
  + private onAFilename(document: vscode.TextDocument, position: vscode.Position, token: string) : string|null {
  + const line = document.lineAt(position.line).text
  + const escapedToken = utils.escapeRegExp(token)
  + const regexInput = new RegExp(`\\\\(?:include|input|subfile)\\{${escapedToken}\\}`)
  + const regexImport = new RegExp(`\\\\(?:sub)?(?:import|includefrom|inputfrom)\\*?\\{([^\\}]*)\\}\\{${escapedToken}\\}`)
  +
  + if (! vscode.window.activeTextEditor) {
  + return null
  + }
  +
  + let dirs: string[] = []
  + if (line.match(regexInput)) {
  + dirs = [path.dirname(vscode.window.activeTextEditor.document.fileName), this.extension.manager.rootDir]
  + }
  +
  + const result = line.match(regexImport)
  + if (result) {
  + dirs = [path.resolve(path.dirname(vscode.window.activeTextEditor.document.fileName), result[1])]
  + }
  +
  + if (dirs.length > 0) {
  + return utils.resolveFile(dirs, token, '.tex')
  + }
  + return null
  + }
  +
  +
  public provideDefinition(document: vscode.TextDocument, position: vscode.Position, _token: vscode.CancellationToken) :
  Thenable<vscode.Location> {
  return new Promise((resolve, _reject) => {
  @@ -63,6 +91,13 @@ export class DefinitionProvider implements vscode.DefinitionProvider {
  return
  }
  }
  +
  + const filename = this.onAFilename(document, position, token)
  + if (filename) {
  + resolve(new vscode.Location(
  + vscode.Uri.file(filename), new vscode.Position(0, 0)
  + ))
  + }
  resolve()
  })
  }
  