How to use the xterm.Terminal.fit function in xterm

To help you get started, we’ve selected a few xterm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facebookarchive / atom-ide-ui / modules / atom-ide-ui / pkg / atom-ide-terminal / lib / createTerminal.js View on Github external
export function createTerminal(options: TerminalOptions = {}): Terminal {
  // Load the addons on-demand the first time we create a terminal.
  // $FlowIgnore
  if (XTerminal.fit == null) {
    // The 'fit' add-on resizes the terminal based on the container size
    // and the font size such that the terminal fills the container.
    XTerminal.applyAddon(Fit);
  }
  // $FlowIgnore
  if (XTerminal.webLinksInit == null) {
    // The 'webLinks' add-on linkifies http URL strings.
    XTerminal.applyAddon(WebLinks);
  }
  const rendererType = featureConfig.get(RENDERER_TYPE_CONFIG);
  // $FlowIgnore We know that TerminalClass is XTerminal + addons
  const terminal = new XTerminal(
    // $FlowIssue: xterms type needs to be updated to include experimentalCharAtlas
    assertTerminalOptionsInFeatureConfig({
      cursorBlink: featureConfig.get(CURSOR_BLINK_CONFIG),
      cursorStyle: featureConfig.get(CURSOR_STYLE_CONFIG),