4.1.0
π Features
π¦ API
-
A callback can now be specified when calling
Terminal.write
that fires when the terminal has parsed the provided data (#2422) via @jerch. This is useful to know when the terminal state has definitely been updated after a write since writes are deferred and done in chunks to avoid locking up the web page.const term = new Terminal(); term.write('hello world', () => console.log('processed'));
We decided to use a callback-based approach here rather than promise-based since
write
is one of the most performance critical parts of xterm.js and it can easily be adapted into a promise:const p = new Promise(r => term.write('hello world', r));
-
Terminal.write
andTerminal.writeln
now accept anUint8Array
in addition tostring
(#2422) via @jerch
π Bug fixes
π Documentation and internal improvements
- Debug logging now logs character codes in addition to the actual string representation (#2424) via @Tyriar
- Clean up keyboard handling logic and inaccurate comments (#2425) via @Tyriar
- Remove redundant build step in publish Azure Pipelines job (#2427) via @Tyriar
- Add tests for IL, DL and DCH sequences (#2431) via @Tyriar
- Correct addon example in readme (#2437) via @kafeg
- Fix demo on Windows (#2442) via @Tyriar
- Upgrade to typescript 3.6 (#2447) via @Tyriar
β οΈ Deprecations
-
Terminal.writeUtf8
has been deprecated in favor ofTerminal.write
(#2422) via @jerch// deprecated term.writeUtf8(buffer); // recommended term.write(buffer);
π₯ Addons
xterm-addon-attach
π€ Compatible addon versions
- xterm-addon-attach@0.3.0
- xterm-addon-fit@0.2.1
- xterm-addon-search@0.2.1
- xterm-addon-ligatures@0.2.1
- xterm-addon-web-links@0.2.1
- xterm-addon-webgl@0.2.1