Releases: xtermjs/xterm.js
3.0.1
3.0.0
The xterm.js team is happy to push out our biggest release yet!
As well as a bunch of features, this release is a major bump and we're using this as an opportunity to clean up APIs and debt items that can cause breaking changes, so many sure you review the
🆕 Features
New Canvas-based Rendering Engine
The rendering code has been completely re-written, moving from DOM-based rendering to canvas-based. Various tricks are used to boost performance significantly, When benchmarked there was a 5 to 45 times improvement depending on the situation.
You can read more about these changes on the Visual Studio Code blog.
Themes
Since xterm.js now renders everything in a canvas, it needs to know what the colors for everything are. As such there is now a theme API which can be set just like any other option:
var term = new Terminal({
theme: {
background: '#000'
}
});
// or
term.setOption('theme', {
background: '#FFF'
});
Refer to the xterm.d.ts
file for an overview of the keys that can be set.
Bell support
The terminal bell can now be enabled:
var term = new Terminal({
bellStyle: 'sound'
});
// or
term.setOption('bellStyle', 'sound');
You can also set it to a custom sound using a data URI:
var term = new Terminal({
bellSound: 'data:audio/wav;base64,...'
});
This was a community contribution from @npezza93 ❤️, visual bell support was also added but this broke during the rendering changes. Hopefully it shall return soon 😃
Proper TypeScript typings
Previously we shipped typings that were generated by TypeScript itself. These exported absolutely everything, including unstable private APIs which you should not depend on. As of this release we now ship handwritten TypeScript typings that export only the public API. This should make working with xterm.js a much more pleasant experience in an editor that supports typings.
Other features
- #869: Regular selection can be forced using the shift key on Windows/Linux, this is useful when a program such as
tmux
is intercepting mouse events - #1044: Letter spacing is now supported
- #1048: Bold can now be disabled via the
enableBold
option - #1097: Bracketed paste mode is now supported
- #1043: Dim/faint characters are now supported
🆕 API
- #878: New option
bellStyle
can set the terminal's bell style, valid values:'sound'
|'none'
- #878: New option
bellSound
can set the bell sound whenbellStyle
is'sound'
- #1044: New option
letterSpacing
- #1048: New option
enableBold
- #1093: A
selection
event is now omitted when the user makes a selection - #1095: There is a new addon
winptyCompat
which attempts to get wraparoundMode working when winpty is running the shell
🪲 Bug fixes
- #475: Fixed issue where spaces could appear in between rows
- #654: Links that have different text styles throughout are now parsed correctly
- #681: Fixed problem where focus/blur state could be incorrect
- #730 Bold character width is now enforced to be the same as non-bold width
- #759: Reverse color mode now works correctly when using a light theme
- #802: The alternate screen buffer now always has 0 scrollback as per the spec
- #847: Buffer size is now defined as the number of rows + scrollback like most other terminals, previously it was just scrollback
- #848: Scrolling in tmux when the document has a scroll bar will no longer scroll the page as well
- #851: Fixed a crash that could occur when setting a negative tab stop
- #893: Fixed an exception when switching to the alt buffer before
Terminal.open
is called - #911: A negative scrollback value is now prevented
- #913:
mousedown
event now continues propagation when the terminal has selection and a right click, allowing the context menu to be canceled - #919, #920: Fixed several exceptions related to managing the terminal lines in the DOM
- #930: Fixed tab stops in the alt buffer
- #936: Actual FG and BG colors are now used when inverting text
- #937: Characters should now be laid out on a pixel perfect grid
- #935: Sub-pixel anti-aliasing should now always work as well, previously it was somewhat flaky
- #947: Fixed
CSI Ps M
to delete the correct line - #948 via @nikonso: Scrollback now has an upperbound of
2^32 - 1
- #978: Auto scrolling while the user is scrolled up will now stay put unless the viewport reaches the end of the buffer
- #959: Link underlines should now clear on scroll
- #960: Only the link from the current line will update when typing
- #986: Fixed an exception when dragging below the viewport
- #1025: Fixed issue where links would sometimes not be applied
- #1110: Delete chars escape sequence now refreshes the line
📝 Documentation and internal improvements
- #335, #862, #1130: All remaining JavaScript has been converted to TypeScript
- #1068: CSS is now more general, using
.xterm
over.terminal
- #850 via @PeterBaumgarten: Mark that a C++ compiler is required to build
- We have a new logo, source files are located at https://github.com/xtermjs/xtermjs-branding
🎉 New real-world use cases
- Proxmox VE #1149 via @flumm
- Theia #956 via @marcdumais-work
- vterm #888 via @lucat1
- Whack Whack Terminal #886 via @dgriffen
- script-runner #879 via @ioquatix
⚠️ Breaking changes
As always make sure you pull in the latest changes from xterm.css if you have forked it, the file size has reduced significantly due to theme/color information moving from CSS to JS.
-
#406: We no longer ship xterm.js to Bower
-
#646:
Terminal.open
no longer accepts the secondfocus
argument, callTerminal.focus
instead:// v2 term.open(element, true); // v3 term.open(element); term.focus();
-
#744:
attachCustomKeydownHandler
has been removed, useattachCustomKeyEventHandler
instead:// v2 term.attachCustomKeydownHandler(f); // v3 term.attachCustomKeyEventHandler(f);
-
#841:
geometry
has been removed as an option in theTerminal
constructor, usecols
androws
instead:// v2 var term = new Terminal({geometry: [10, 5]}); // v3 var term = new Terminal({ cols: 10, rows: 5 });
-
#902:
scrollDisp
has been renamed toscrollLines
:// v2 term.scrollDisp(1); // v3 term.scrollLines(1);
-
#901: The
open
event has been removed, put your code immediately after the call toTerminal.open
instead:// v2 term.on('open', f); term.open(element); // v3 term.open(element); f();
-
#903: The
refresh
event no longer gives theelement
in its data object, use theTerminal
object instead:// v2 term.on('refresh', e => console.log(e.element)); // v3 term.on('refresh', () => console.log(term.element));
-
#903: The
resize
event no longer gives theterminal
in its data object, use theTerminal
object instead:// v2 term.on('resize', e => console.log(e.terminal)); // v3 term.on('resize', () => console.log(term));
-
#1159: The
lineFeed
event has been renamed tolinefeed
:// v2 term.on('lineFeed', () => {}); // v3 term.on('linefeed', () => {});
❤️ Thanks
A special thanks to everyone who helped put this release together including the core team (myself, @parisk, @mofux), contributors who created PRs (@PeterBaumgarten, @npezza93, @dgriffen, @lucat1, @dcylabs, @marcdumais-work, @ricktbaker, @jgillich, @jdanbrown, @martin31821, @nikonso, @flumm) and everyone who participated in reporting and discussing issues!
2.9.2
2.9.1
2.9.0
📣 Public Service Announcement: 2.9.0 is the last 2.x release (except for bug fix releases), before xterm.js 3.0.
🆕 Features
🆕 API
Read more about the API specifics on the website.
🐞 Bug fixes
- Ensure scrollbar is refreshed after "erase all" in display (#761) via @Tyriar
- Don't refresh terminal when
scrollDisp
does not scroll (#766) via @Tyriar - Fix "unscrollable" terminal before first resize (#784) via @chrmarti
- Clear selection on user input (#794) via @mofux
- Fail gracefully when methods request the Selection API, before it is initialized (#797) via @mofux
- Fix error on selection when mouse coordinates are bad (#805) via @Tyriar
- Terminal selection is now forced, when using Alt (#816) via @joaomoreno
- Fix
TypeError
when callingresize()
via thefit
add-on (#823) via @jpmasters - Fix terminal not getting focus on click, if a selection existed outside of the terminal (#828) via @parisk
- Retain character color when using underline or bar cursor (#781) via @mofux
📝 Documentation and internal improvements
- Add macOS as a CI target (#690) via @Tyriar
- Introduce new
Buffer
andBufferSet
classes for buffer management (#717) via @parisk - Add
search.exclude
setting for Visual Studio Code workspace (#772) via @mjbvz - Use
event.detail
instead of counting clicks in Selection Manager (#780) via @mofux - Remove bad
value
parameter fromgetOption
(#793) via @Tyriar - Remove unused constants from Selection Manager (#795) via @mofux
- Improve performance of
wcwidth
by using a lookup table (#798) via @jerch - Fix browserify and search addon build (#804) via @Tyriar
- Make Selection Manager more resilient by introducing
null
checks (#810) via @Tyriar
🎉 New real-world use cases
- Portainer.io (#775) via @deviantony
- SSH-y (#743) via @stuicey
- JupyterLab (#811) via @blink1073
2.8.1
2.8.0
🆕 Features
-
Selection reimplemented #670, #691, #714, #715, #716, #719, #723, #725, #733, #746 via @Tyriar
Selection is now managed completely by the xterm.js library, rather than relying on the native browser implementation. This adds a huge host of features and bug fixes:
- Support selecting and copying multiple pages of the buffer #69
- Support selection from multiple pages using the mouse wheel #68
- Fix spinners in console applications making selection difficult #318
- Fix selection being lost when data is written outside of the viewport #468
- Support double clicking on a URL/path to highlight the whole path
- Fix double clicking on the prompt line being flaky due to focus shifting from .xterm to the text area
- Prevent gaps from appearing between lines in the selection
- Don't drop the selection when there's a content change or viewport scroll #318, #468
- Allow selection to be retained in terminal when not focused
- Prevent selection being dropped sometimes when right clicking outside of selection
- Prevent selection from being shown sometimes when context menu is closed on macOS
- Allow selections starting from links
- Ensure copying will retain padding whitespace when necessary #673
- Improve tmux support by disabling selection when in mouse interaction mode #140, #329, #456
- Fix copy and paste in Edge #401
-
Support scroll on touch devices (does not support ballistic scroll yet) #747 via @anishathalye
🆕 API
Terminal.attachCustomKeyEventHandler
Terminal.selectAll
Terminal.hasSelection
Terminal.clearSelection
Terminal.getSelection
Read more about the API specifics on the website.
🐞 Bug fixes
- Fixed bug where viewport was the wrong height when zoomed in #680 via @Tyriar
- Fixed issue where link text was being duplicated #688 via @Tyriar
- Retain wrapped line state when copying lines #693 via @Tyriar
- Prevent selection outside of terminal when dragging with mouse #700 via @Tyriar
- Normalize line ending to
\r
instead of\n
when pasting into the terminal on Windows, fixing paste on various Windows shells #707 via @jdanyow - Fix context menu in Firefox #722 via @Tyriar
- Use CRLF when copying from the terminal on Windows #738 via @Tyriar
- Prevent scrollback from being less than the terminal's row count #749, #750 via @irokas
- Fix demo in IE11 #752 via @LucianBuzzo
- Fix
Element.classList.add
call in IE11 #754 via @LucianBuzzo
📝 Documentation and internal improvements
- Fix issue with git line endings #736 via @AndrienkoAleksandr
- Code and jsdoc clean up #741 via @AndrienkoAleksandr
⚠️ Deprecations
- Introduced new
Terminal.attachCustomKeyEventHandler
API and deprecatedTerminal.attachCustomKeydownHandler
. Both APIs now apply to all key events, not just keydown #712 via @chabou
🎉 New real-world use cases
- Gravitational Teleport #710 via @alex-kovoy
- Hexlet #743 via @nechitai
Work in progress PRs merged
- Buffer/BufferSet refactor #717
- Fix turning from alt screen to normal screen and vice versa #728 via @AndrienkoAleksandr
- Fix some tests and docs #739 via @AndrienkoAleksandr
2.7.0
2.6.0
🆕 Features
🐞 Bug fixes
- Keep cursor blink interval after a reset (#639)
📝 Documentation and internal improvements
- Force failing mocha tests to return an exit code of 1 (#652)
⚠️ Deprecations
- Focusing on terminal automatically when calling
.open()
is now deprecated and will be removed in 3.0.0 (#645)
🎉 New real-world use cases
2.5.0
Features
- Implement
CSI 3 J
(Erase saved lines) (#588)
Refining the link matcher (#616)
The experimental link matcher feature has seen more refinements this release:
- Support multiple link matches in a single row (#623)
- Allow links to be registered before terminal is attached to DOM (#619)
- Ensure terminal links are not draggable (#610)
- Allow ~ char in linkify path and query fragments (#606)
- Give API access to valid link elements (#627)
Bug fixes
- Retain line data when reducing horizontal size of terminal (#616)
- Fix cursor style when terminal is not focused (#603)
- Fix issue with height calculation in fit addon (#598)
- Also check height in checkBoldBroken (#582)
Performance improvements
- Improve cursor blinking performance by conerting from CSS animation to setInterval (#626)