Skip to content

Releases: xtermjs/xterm.js

3.0.1

05 Jan 16:59
45ed27d
Compare
Choose a tag to compare

#1190: Fixes the typings/ directory not being published to npm

3.0.0

05 Jan 16:59
6b98d09
Compare
Choose a tag to compare

The xterm.js team is happy to push out our biggest release yet!

image
^ Our handsome new logo

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 ⚠️ Breaking changes section if you're upgrading from version 2.

🆕 Features

New Canvas-based Rendering Engine

#935, #973, #963

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.

60fps
^ Whoooosh

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

#878, #904

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

#898

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.

image

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 when bellStyle 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

🎉 New real-world use cases

⚠️ 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 second focus argument, call Terminal.focus instead:

    // v2
    term.open(element, true);
    
    // v3
    term.open(element);
    term.focus();
  • #744: attachCustomKeydownHandler has been removed, use attachCustomKeyEventHandler instead:

    // v2
    term.attachCustomKeydownHandler(f);
    
    // v3
    term.attachCustomKeyEventHandler(f);
  • #841: geometry has been removed as an option in the Terminal constructor, use cols and rows instead:

    // v2
    var term = new Terminal({geometry: [10, 5]});
    
    // v3
    var term = new Terminal({
      cols: 10,
      rows: 5
    });
  • #902: scrollDisp has been renamed to scrollLines:

    // v2
    term.scrollDisp(1);
    
    // v3
    term.scrollLines(1);
  • #901: The open event has been removed, put your code immediately after the call to Terminal.open instead:

    // v2
    term.on('open', f);
    term.open(element);
    
    // v3
    term.open(element);
    f();
  • #903: The refresh event no longer gives the element in its data object, use the Terminal 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 the terminal in its data object, use the Terminal 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 to linefeed:

    // 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

09 Aug 06:52
ea07bf8
Compare
Choose a tag to compare

🐞 Bug fixes

  • Fixed an issue when resizing both dimensions of the terminal (#873, #860) via @Tyriar

2.9.1

06 Aug 18:12
a28d9f1
Compare
Choose a tag to compare

🐞 Bug fixes

  • Fixed an issue when resizing the terminal while inside the alt buffer (#843, #842) via @Tyriar, @mofux
  • Proper support for retaining the normal buffer when the alt buffer is resized (#843, #510) via @Tyriar
  • Fixed a webpack warning when bundling xterm.js (#834) via @blink1073

2.9.0

03 Aug 18:44
f5ba386
Compare
Choose a tag to compare

📣 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 calling resize() via the fit 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 and BufferSet 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 from getOption (#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

2.8.1

08 Jul 14:06
2b92996
Compare
Choose a tag to compare

🐞 Bug fixes

📝 Documentation and internal improvements

2.8.0

04 Jul 16:50
479fb0e
Compare
Choose a tag to compare

🆕 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

⚠️ Deprecations

  • Introduced new Terminal.attachCustomKeyEventHandler API and deprecated Terminal.attachCustomKeydownHandler. Both APIs now apply to all key events, not just keydown #712 via @chabou

🎉 New real-world use cases

Work in progress PRs merged

2.7.0

14 Jun 03:47
4b72791
Compare
Choose a tag to compare

🐞 Bug fixes

  • Emit the paste event on the Terminal (#674)
  • Fix an issue with parsing an escape sequence emitted by the vtop program (#672)
  • Normalize line endings when pasting on Windows (#659)
  • Improve support for unicode characters by wrapping and explicitly sizing them (#450)

Before #450:

image

After #450:

image

2.6.0

05 May 23:42
2221f70
Compare
Choose a tag to compare

🆕 Features

  • Support cursorStyle selection in demo (#641)
  • Add focus argument in .open() (#645)

🐞 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

05 Apr 19:04
d2f8f9d
Compare
Choose a tag to compare

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)

Documentation/internal improvements

  • Add xterm.js logo (#608)
  • Fix typos (#624, #589)
  • Add Cloud Commander and Spyder IDE to real world use cases (#621, #615)
  • Rebuild xterm.js even when CSS changes (#604)
  • Polish development and contribution section (#600)
  • tsconfig.json improvements (#586, #572)