Files
xterm.js/addons/xterm-addon-fit
ElJeffe 5c9adeef93 Check to make sure cols & rows are INT
I've noticed that if the terminal is hidden and the screen experiences a resize trigger from a blur / focus, it can cause the dimensions to be undefined.  This creates an exception in Xterm.js that the values are not integers.  Figured it would be ok to just check before doing a resize.
2021-10-26 11:44:52 -04:00
..
2019-06-04 11:07:11 -07:00
2019-06-04 11:07:11 -07:00
2019-06-04 11:07:11 -07:00
2021-01-29 09:14:31 -08:00
2019-09-09 09:28:33 -07:00
2019-06-10 14:28:07 -07:00

xterm-addon-fit

An addon for xterm.js that enables fitting the terminal's dimensions to a containing element. This addon requires xterm.js v4+.

Install

npm install --save xterm-addon-fit

Usage

import { Terminal } from 'xterm';
import { FitAddon } from 'xterm-addon-fit';

const terminal = new Terminal();
const fitAddon = new FitAddon();
terminal.loadAddon(fitAddon);
terminal.open(containerElement);
fitAddon.fit();

See the full API for more advanced usage.