npm xterm 3.3.0

latest releases: 5.0.0, 5.0.0-beta.60, 5.0.0-beta.59...
6 years ago

We have recently welcomed @bgw as a maintainer on the project due to his significant contributions around improving the character texture atlas and refactoring work.

🆕 Features

  • Use of the mouse wheel in the alt buffer will be translated into arrow events, enabling scrolling in applications like vim (#1310) via @Tyriar
  • Handle blob data in the attach addon (#1355) via @AlexandrePetit-Pas

🆕 API

For the latest version of the API, check the typings file for the version you're interested in.

  • Added a new experimental "Markers" API (#1338) via @Tyriar, this allows tracking specific lines within the terminal. This is needed as line indexes are insufficient since the terminal can trim lines from the top of the scrollback buffer and lines within the viewport can change.

    export interface IMarker extends IDisposable {
      readonly id: number;
      readonly isDisposed: boolean;
      readonly line: number;
    }
    
    export class Terminal {
      /**
       * (EXPERIMENTAL) Get all markers registered against the buffer. If the alt
       * buffer is active this will always return [].
       */
      markers: IMarker[];
    
      /**
       * (EXPERIMENTAL) Adds a marker to the normal buffer and returns it. If the
       * alt buffer is active, undefined is returned.
       * @param cursorYOffset The y position offset of the marker from the cursor.
       */
      addMarker(cursorYOffset: number): IMarker;
    }

    Any feedback on this API would be appreciated as it's not set in stone.

  • Added an API to select a range of lines (#1338) via @Tyriar:

    /**
     * Selects text in the buffer between 2 lines.
     * @param start The 0-based line index to select from (inclusive).
     * @param end The 0-based line index to select to (inclusive).
     */
    selectLines(start: number, end: number): void;
  • Added an API to scroll to a particular line (#1338) via @Tyriar:

    /**
     * Scrolls to a line within the buffer.
     * @param line The 0-based line index to scroll to.
     */
    scrollToLine(line: number): void;

🐞 Bug fixes

  • Theme colors are now validated and color names such as lime and red are now accepted (#1293) via @nikonso
  • Improve handling of transparent theme colors and allow additional formats such as #RGB (#1346) via @bgw
  • Pasting new lines on non-Windows are now normalized to \r, just like on Windows (#1296) via @olsonpm
  • Multi-line links should now work (#1303) via @Tyriar, there are still issues when you resize the terminal after a line has printed which will be resolved when reflow is implemented (#622)
  • Do not mutate options object used in the Terminal constructor (#1326) via @LucianBuzzo
  • Fix terminal when it's container specifies a rtl text layout (#1350) via @FGasper
  • Prevent falsy write values (#1366) via @Tyriar
  • Fix exception when Terminal.reset is called before Terminal.open) is called (#1381) via @Tyriar

📝 Documentation and internal improvements

  • Refactors for the character texture atlas (#1307) via @bgw
  • Always check whether the character texture atlas needs to be refreshed, regardless of whether we think character size has changed or not (#1308) via @bgw
  • Reduce duplication of interfaces around the character texture atlas (#1317) via @bgw
  • Add note about stance on shipping third party dependencies (#1332) via @Tyriar
  • Reduce use of inline styles (#1336) via @mareklibra
  • Several debt/lint related items (#1315, #1316, #1318, #1320, #1329, #1340, #1344) via @Tyriar

🎉 New real-world use cases

Don't miss a new xterm release

NewReleases is sending notifications on new releases.