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