title: VS-Code Extension: vscode.window.activeTextEditor == undefined
body: <p>I wrote an Visual Studio Code extension.
  Based on this example:
  <a href="https://github.com/Microsoft/vscode-extension-samples/tree/master/previewhtml-sample" rel="nofollow noreferrer">https://github.com/Microsoft/vscode-extension-samples/tree/master/previewhtml-sample</a></p>
  
  <pre class="lang-ts prettyprint-override"><code>var editor = vscode.window.activeTextEditor;
  if (!editor) {
      console.log("No open text editor");
  }
  </code></pre>
  
  <p>This works fine if i open a 2MB File.
  But not if the file is 5MB or larger.</p>
  
  <p>But if I copy (<kbd>Ctrl</kbd>+<kbd>C</kbd>,<kbd>Ctrl</kbd>+<kbd>V</kbd>) a 10MB into a new editor it will work and is prety fast.
  Has anyone an idea what kind of limitation this is?</p>
  
  <p>Or is there perhaps a work around by some how let user choose a file in command.
  To directly read the file?</p>