Skip to content

5.1.0

Compare
Choose a tag to compare
@Tyriar Tyriar released this 19 Dec 18:34
· 1027 commits to master since this release
19c760a

πŸš€ Features

Multiple texture atlas page support (#4244, #4252, #4274) via @Tyriar

Instead of there being a hard cap of 1024x1024 on the size of the texture atlas backing the canvas and webgl renderers, multiple textures are now supported. Each individual texture is now 512x512 which allows faster uploading to the GPU and will continually merge until the maximum of 4096x4096 is reached.

The benefits in simple terms of this change are:

  • Less time from drawing a glyph to rendering it
  • Less CPU is used when lots of glyphs are used
  • Essentially unlimited space for glyphs, which is good for certain use cases but will also let us explore things like "perfect" dotted and curvy underlines in the future

Here is an example of a 512x512 texture atlas page right after the terminal has loaded and printed a powerline-based prompt:

image

And here is the 1024x1024 page after a lot of glyphs have rendered:

image

Slash and triangle custom glyphs (#4313) via @Tyriar

Eight new powerline extra custom glyphs are supported:

image

New option scrollOnUserInput (#4289) via @JasonXJ

You can now specify whether to scroll to the bottom of the terminal on user input, previously this was the default and only behavior. This new setting is enabled by default.

const term = new Terminal({ scrollOnUserInput: false });

🐞 Bug fixes

  • Fix width of upper 1/8 block character (#4134) via @Tyriar
  • Allow the renderer to be set before Terminal.open is called (#4151) via @Tyriar
  • Fix trusted types in dom renderer (#4157) via @Tyriar
  • Fix several memory retention issues (#4185) via @Tyriar
  • Remove check proposed api checks (#4204) via @silamon
  • Clear the extended attribute on CSI 0 m via @JasonXJ
  • Fix clipping of italic emoji (#4237) via @Tyriar
  • Fix some edge cases in screenReaderMode (#4284) via @JasonXJ
  • Send corresponding escape code for alt+space and ctrl+alt+space (#4290) via @JasonXJ
  • Re-evaluate the link under the cursor instead dropping it completely when the terminal buffer changes (#4298) via @jerch

🏎️ Performance

πŸ“ Documentation and internal improvements

πŸ›‘ Breaking changes

  • There is a new allowNonHttpProtocols property on ILinkHandler which forces the embedder to opt-in to non-http(s) protocols. This is a breaking change in a minor release as it could improve security of embedders.
    // before 5.1.0
    const term = new Terminal({
      linkHandler: {
        ...
      }
    };
    
    // after 5.1.0
    const term = new Terminal({
      linkHandler: {
        // If you explicitly support and sanitize the links
        allowNonHttpProtocols: true,
        ...
      }
    };

πŸŽ‰ New real-world use cases


πŸ“₯ Addons

xterm-addon-attach

  • Warn/throw on unexpected attach addon socket state (#4208) via @Tyriar

xterm-addon-canvas

  • Share texture atlases between the webgl and canvas renderers (#4170, #4168, #4182) via @Tyriar
  • Fix glyphs becoming garbled or invisible (#4189) via @Tyriar
  • Disable canvas ImageBitmap optimization on Safari (#4219) via @Tyriar
  • Correctly offset minimumContrastRatio check (#4239) via @Tyriar
  • Fix line height and letter spacing rendering (#4305) via @Tyriar
  • Fix canvas renderer selection not re-rendering sometimes (#4325) via @Tyriar

xterm-addon-serialize

  • Fallback to default ansi colors when running xterm-headless (#4196) via @silamon

xterm-addon-webgl

xterm-addon-web-links

  • Major rework of the addon (#4288) via @jerch. This adds support for more URLs, fixes underlines sometimes being incorrect and changes the regex. There will be regressions in previous behavior with this but overall it's in a much better state. If you find any problems please report them to us.
  • Add 1024 character limit (#4251) via @Tyriar

🀝 Compatible addon versions

  • xterm-addon-attach@0.7.0
  • xterm-addon-fit@0.7.0
  • xterm-addon-ligatures@0.6.0
  • xterm-addon-search@0.11.0
  • xterm-addon-serialize@0.9.0
  • xterm-addon-unicode11@0.5.0
  • xterm-addon-web-links@0.8.0
  • xterm-addon-webgl@0.14.0