Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 1.98 KB

DevNotes.md

File metadata and controls

35 lines (23 loc) · 1.98 KB

Dev Notes

Ideas

Here is the flow that I would like to see if I can get access to the underlying terminal content... NOTE: The terminal is based on xterm.js - https://github.com/xtermjs/xterm.js#readme
I also think that getting access to the Buffer might make this solution a bit easier

NOTE: This code was all found on commit c110d84460b3e45842a8fe753562341003595e1d from the vscode source.

  1. terminalInstance.selectAll() - src/vs/workbench/contrib/terminal/electron-browser/terminalActions.ts:185
  2. terminalInstance.copySelection() - src/vs/workbench/contrib/terminal/electron-browser/terminalActions.ts:164 this._xterm.getSelection() - src/vs/workbench/contrib/terminal/electron-browser/terminalInstance.ts:684
  3. terminalInstance.clearSelection() - src/vs/workbench/contrib/terminal/electron-browser/terminalActions.ts:164 this._xterm.clearSelection() - src/vs/workbench/contrib/terminal/electron-browser/terminalInstance.ts:695

Clearning Special Characters

One of the first issues that I ran into is that the dat captured from the terminal included special characters (like color selections).

This regex can be used in js to select all color code special characters so that they can be cleaned from the data.

\x1b\[[0-9;]*m

External Pages