Skip to content

Commit

Permalink
Support for OSC52 clipboard access
Browse files Browse the repository at this point in the history
Fixes #193508
  • Loading branch information
Tyriar committed Jun 4, 2024
1 parent 7994fdb commit 30e7857
Show file tree
Hide file tree
Showing 12 changed files with 198 additions and 117 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,7 @@
"vscode-regexpp",
"vscode-textmate",
"worker_threads",
"@xterm/addon-clipboard",
"@xterm/addon-image",
"@xterm/addon-search",
"@xterm/addon-serialize",
Expand Down
3 changes: 3 additions & 0 deletions build/.webignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ vscode-textmate/webpack.config.js

@xterm/xterm/src/**

@xterm/addon-clipboard/src/**
@xterm/addon-clipboard/out/**

@xterm/addon-image/src/**
@xterm/addon-image/out/**

Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,14 @@
"@vscode/windows-mutex": "^0.5.0",
"@vscode/windows-process-tree": "^0.6.0",
"@vscode/windows-registry": "^1.1.0",
"@xterm/addon-image": "0.9.0-beta.19",
"@xterm/addon-search": "0.16.0-beta.19",
"@xterm/addon-serialize": "0.14.0-beta.19",
"@xterm/addon-unicode11": "0.9.0-beta.19",
"@xterm/addon-webgl": "0.19.0-beta.19",
"@xterm/headless": "5.6.0-beta.19",
"@xterm/xterm": "5.6.0-beta.19",
"@xterm/addon-clipboard": "0.2.0-beta.4",
"@xterm/addon-image": "0.9.0-beta.21",
"@xterm/addon-search": "0.16.0-beta.21",
"@xterm/addon-serialize": "0.14.0-beta.21",
"@xterm/addon-unicode11": "0.9.0-beta.21",
"@xterm/addon-webgl": "0.19.0-beta.21",
"@xterm/headless": "5.6.0-beta.21",
"@xterm/xterm": "5.6.0-beta.21",
"http-proxy-agent": "^7.0.0",
"https-proxy-agent": "^7.0.2",
"jschardet": "3.1.2",
Expand Down
15 changes: 8 additions & 7 deletions remote/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@
"@vscode/vscode-languagedetection": "1.0.21",
"@vscode/windows-process-tree": "^0.6.0",
"@vscode/windows-registry": "^1.1.0",
"@xterm/addon-image": "0.9.0-beta.19",
"@xterm/addon-search": "0.16.0-beta.19",
"@xterm/addon-serialize": "0.14.0-beta.19",
"@xterm/addon-unicode11": "0.9.0-beta.19",
"@xterm/addon-webgl": "0.19.0-beta.19",
"@xterm/headless": "5.6.0-beta.19",
"@xterm/xterm": "5.6.0-beta.19",
"@xterm/addon-clipboard": "0.2.0-beta.4",
"@xterm/addon-image": "0.9.0-beta.21",
"@xterm/addon-search": "0.16.0-beta.21",
"@xterm/addon-serialize": "0.14.0-beta.21",
"@xterm/addon-unicode11": "0.9.0-beta.21",
"@xterm/addon-webgl": "0.19.0-beta.21",
"@xterm/headless": "5.6.0-beta.21",
"@xterm/xterm": "5.6.0-beta.21",
"cookie": "^0.4.0",
"http-proxy-agent": "^7.0.0",
"https-proxy-agent": "^7.0.2",
Expand Down
13 changes: 7 additions & 6 deletions remote/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
"@microsoft/1ds-post-js": "^3.2.13",
"@vscode/iconv-lite-umd": "0.7.0",
"@vscode/vscode-languagedetection": "1.0.21",
"@xterm/addon-image": "0.9.0-beta.19",
"@xterm/addon-search": "0.16.0-beta.19",
"@xterm/addon-serialize": "0.14.0-beta.19",
"@xterm/addon-unicode11": "0.9.0-beta.19",
"@xterm/addon-webgl": "0.19.0-beta.19",
"@xterm/xterm": "5.6.0-beta.19",
"@xterm/addon-clipboard": "0.2.0-beta.4",
"@xterm/addon-image": "0.9.0-beta.21",
"@xterm/addon-search": "0.16.0-beta.21",
"@xterm/addon-serialize": "0.14.0-beta.21",
"@xterm/addon-unicode11": "0.9.0-beta.21",
"@xterm/addon-webgl": "0.19.0-beta.21",
"@xterm/xterm": "5.6.0-beta.21",
"jschardet": "3.1.2",
"tas-client-umd": "0.2.0",
"vscode-oniguruma": "1.7.0",
Expand Down
70 changes: 41 additions & 29 deletions remote/web/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -48,35 +48,47 @@
resolved "https://registry.yarnpkg.com/@vscode/vscode-languagedetection/-/vscode-languagedetection-1.0.21.tgz#89b48f293f6aa3341bb888c1118d16ff13b032d3"
integrity sha512-zSUH9HYCw5qsCtd7b31yqkpaCU6jhtkKLkvOOA8yTrIRfBSOFb8PPhgmMicD7B/m+t4PwOJXzU1XDtrM9Fd3/g==

"@xterm/[email protected]":
version "0.9.0-beta.19"
resolved "https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.19.tgz#3823382e5c55268998f0e0d8d77e8b7810925830"
integrity sha512-LX9g03po3mXYE/HZFoKbdnIRvdD56Qw84FpQ9LCJGDsyx9SFIf47DXLS+lXCEpJ2hjKIing46BQxP+MDEayXDw==

"@xterm/[email protected]":
version "0.16.0-beta.19"
resolved "https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.19.tgz#46b3374eb312a1bff974a5df188b1ebf777ff49d"
integrity sha512-iTJVUEsKSdL8SyhcDBqN6gYxhqv0wrwtP1QCUGLKNAAVDI7HKVgig3V9wToqRxYfOnu/anyU+u0qFUoKCRLnCg==

"@xterm/[email protected]":
version "0.14.0-beta.19"
resolved "https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.19.tgz#c7a0a0e5f5b1bd94a35a775ec6224ba42282556c"
integrity sha512-D+BiXQfuxDb3azAIBq1RJTQGZlvo459V6U/2s/3dKpTAvRybqCRMazuf8cLoffUoNcjTb3uSWpii9+MVVvHIrQ==

"@xterm/[email protected]":
version "0.9.0-beta.19"
resolved "https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.19.tgz#529d8b22d9378cff8c31df1b7e76250b2f8079c3"
integrity sha512-0Umiu9GkjwL/jaT85Rcfka9HVyJw3UhJsnOVOVZd/3YBZqMY2SZMHqz73W/qpXl5nz6vvyCWKbpkfddsJhpToA==

"@xterm/[email protected]":
version "0.19.0-beta.19"
resolved "https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.19.tgz#655d1e27b1249c19352c65a8ea1d0bf319397b35"
integrity sha512-Y5efISx8X5hpFAsPOTza1Fp0xiD8x+l3MuH+mv68v1El8tpna/MW5EM4oX25qYOsPDZY00mpmkBmPbAT5loMEg==

"@xterm/[email protected]":
version "5.6.0-beta.19"
resolved "https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.19.tgz#2cc292fc93b25c7c655ed6d1f0425a636b36747d"
integrity sha512-mGoJxrUxAL4dueZEqw2e23KCrGNSvYaw5twTnccKqK7lITK/hDrosWCxb1jL1AjFf7bBzMxw9/dZdhWncKQQmw==
"@xterm/[email protected]":
version "0.2.0-beta.4"
resolved "https://registry.yarnpkg.com/@xterm/addon-clipboard/-/addon-clipboard-0.2.0-beta.4.tgz#9911baaebfbc07a698ae62366a596bfdeac8fa7e"
integrity sha512-p2KGTFUDK4YFthCgfsv2wT66JDTZPcIuoWeDT+TmSFbS1smDPTMCyM/rDDkGY+duHRcQsIMVzGC+2NRb/exX6A==
dependencies:
js-base64 "^3.7.5"

"@xterm/[email protected]":
version "0.9.0-beta.21"
resolved "https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.21.tgz#64fe50ee623f3e518574e1cbbe649cc0c0d60265"
integrity sha512-kTArrrS7K5+WYTTO8Ktt1aYxKTO4/jUm3KmyvPVjf9iw7OhLtG9mU+X9dXo56DTAqmbIUfJgY3OQbWffcyNk7w==

"@xterm/[email protected]":
version "0.16.0-beta.21"
resolved "https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.21.tgz#b8a20e83c1ff24afa675c3723244b2068255688d"
integrity sha512-RVn8yRx+w6R7abWiIttyAR0+Myh+XCYOLAkwco3iIYgzlztmox3Qp6YNzWJj0G8iwSvzxaSu7Fbjbb2PXTOSIg==

"@xterm/[email protected]":
version "0.14.0-beta.21"
resolved "https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.21.tgz#a074c5fdd2105c07574e6848babefef2905d84cb"
integrity sha512-Eg1QT2WG0pAIV+RrPv921+dVQvQqMhoFv2DQfMYDcqNbD2mTvIbX/ecEMb1bmn3WI0jNNomQ8UHZRFNRbDA+BA==

"@xterm/[email protected]":
version "0.9.0-beta.21"
resolved "https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.21.tgz#dc843df701e518bc459e77dcd4fd65fe49adbb4b"
integrity sha512-IiHYZ+88m5MCoAyOHWQ4xXzecOh6FsDDr8lZpJktbFHyzYjBlIDQ6z9cJg+3ApApfo5Xosnmzjs27kf7wG2L0w==

"@xterm/[email protected]":
version "0.19.0-beta.21"
resolved "https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.21.tgz#68b92a47bf6768babd57bfbaf3ac97a7c670d8df"
integrity sha512-YV8Aaxp4QokXXehSCJ7NvudZKPDyBiXv4HqENqDpQllCj4hOWC5xJYSoFoPtu5+UhlzfqqvYRX/Il7QegPFPDg==

"@xterm/[email protected]":
version "5.6.0-beta.21"
resolved "https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.21.tgz#87a4e45752e5708cffc5c583d7f15e107313eb4e"
integrity sha512-1tLJaGudNSg1hEC+ZwUU7PiUvzURzKB5v1IRaJdmZK81ZCxvEF6Qfo281pTZsZFnv2iOWqFEC0C5uRmBXLm0lQ==

js-base64@^3.7.5:
version "3.7.7"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.7.tgz#e51b84bf78fbf5702b9541e2cb7bfcb893b43e79"
integrity sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==

[email protected]:
version "3.1.2"
Expand Down
80 changes: 46 additions & 34 deletions remote/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -122,40 +122,47 @@
resolved "https://registry.yarnpkg.com/@vscode/windows-registry/-/windows-registry-1.1.0.tgz#03dace7c29c46f658588b9885b9580e453ad21f9"
integrity sha512-5AZzuWJpGscyiMOed0IuyEwt6iKmV5Us7zuwCDCFYMIq7tsvooO9BUiciywsvuthGz6UG4LSpeDeCxvgMVhnIw==

"@xterm/[email protected]":
version "0.9.0-beta.19"
resolved "https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.19.tgz#3823382e5c55268998f0e0d8d77e8b7810925830"
integrity sha512-LX9g03po3mXYE/HZFoKbdnIRvdD56Qw84FpQ9LCJGDsyx9SFIf47DXLS+lXCEpJ2hjKIing46BQxP+MDEayXDw==

"@xterm/[email protected]":
version "0.16.0-beta.19"
resolved "https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.19.tgz#46b3374eb312a1bff974a5df188b1ebf777ff49d"
integrity sha512-iTJVUEsKSdL8SyhcDBqN6gYxhqv0wrwtP1QCUGLKNAAVDI7HKVgig3V9wToqRxYfOnu/anyU+u0qFUoKCRLnCg==

"@xterm/[email protected]":
version "0.14.0-beta.19"
resolved "https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.19.tgz#c7a0a0e5f5b1bd94a35a775ec6224ba42282556c"
integrity sha512-D+BiXQfuxDb3azAIBq1RJTQGZlvo459V6U/2s/3dKpTAvRybqCRMazuf8cLoffUoNcjTb3uSWpii9+MVVvHIrQ==

"@xterm/[email protected]":
version "0.9.0-beta.19"
resolved "https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.19.tgz#529d8b22d9378cff8c31df1b7e76250b2f8079c3"
integrity sha512-0Umiu9GkjwL/jaT85Rcfka9HVyJw3UhJsnOVOVZd/3YBZqMY2SZMHqz73W/qpXl5nz6vvyCWKbpkfddsJhpToA==

"@xterm/[email protected]":
version "0.19.0-beta.19"
resolved "https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.19.tgz#655d1e27b1249c19352c65a8ea1d0bf319397b35"
integrity sha512-Y5efISx8X5hpFAsPOTza1Fp0xiD8x+l3MuH+mv68v1El8tpna/MW5EM4oX25qYOsPDZY00mpmkBmPbAT5loMEg==

"@xterm/[email protected]":
version "5.6.0-beta.19"
resolved "https://registry.yarnpkg.com/@xterm/headless/-/headless-5.6.0-beta.19.tgz#dbbd4dd420e24e9bdee6e533153f405bfc1ba89b"
integrity sha512-zFTcftonaaMEbMqfQnFwos1YQCmqWnvIzSNXwmfIymkEvSxhsB03oynEjFwm48dT2filTcJXpYT91io4qvR+3g==

"@xterm/[email protected]":
version "5.6.0-beta.19"
resolved "https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.19.tgz#2cc292fc93b25c7c655ed6d1f0425a636b36747d"
integrity sha512-mGoJxrUxAL4dueZEqw2e23KCrGNSvYaw5twTnccKqK7lITK/hDrosWCxb1jL1AjFf7bBzMxw9/dZdhWncKQQmw==
"@xterm/[email protected]":
version "0.2.0-beta.4"
resolved "https://registry.yarnpkg.com/@xterm/addon-clipboard/-/addon-clipboard-0.2.0-beta.4.tgz#9911baaebfbc07a698ae62366a596bfdeac8fa7e"
integrity sha512-p2KGTFUDK4YFthCgfsv2wT66JDTZPcIuoWeDT+TmSFbS1smDPTMCyM/rDDkGY+duHRcQsIMVzGC+2NRb/exX6A==
dependencies:
js-base64 "^3.7.5"

"@xterm/[email protected]":
version "0.9.0-beta.21"
resolved "https://registry.yarnpkg.com/@xterm/addon-image/-/addon-image-0.9.0-beta.21.tgz#64fe50ee623f3e518574e1cbbe649cc0c0d60265"
integrity sha512-kTArrrS7K5+WYTTO8Ktt1aYxKTO4/jUm3KmyvPVjf9iw7OhLtG9mU+X9dXo56DTAqmbIUfJgY3OQbWffcyNk7w==

"@xterm/[email protected]":
version "0.16.0-beta.21"
resolved "https://registry.yarnpkg.com/@xterm/addon-search/-/addon-search-0.16.0-beta.21.tgz#b8a20e83c1ff24afa675c3723244b2068255688d"
integrity sha512-RVn8yRx+w6R7abWiIttyAR0+Myh+XCYOLAkwco3iIYgzlztmox3Qp6YNzWJj0G8iwSvzxaSu7Fbjbb2PXTOSIg==

"@xterm/[email protected]":
version "0.14.0-beta.21"
resolved "https://registry.yarnpkg.com/@xterm/addon-serialize/-/addon-serialize-0.14.0-beta.21.tgz#a074c5fdd2105c07574e6848babefef2905d84cb"
integrity sha512-Eg1QT2WG0pAIV+RrPv921+dVQvQqMhoFv2DQfMYDcqNbD2mTvIbX/ecEMb1bmn3WI0jNNomQ8UHZRFNRbDA+BA==

"@xterm/[email protected]":
version "0.9.0-beta.21"
resolved "https://registry.yarnpkg.com/@xterm/addon-unicode11/-/addon-unicode11-0.9.0-beta.21.tgz#dc843df701e518bc459e77dcd4fd65fe49adbb4b"
integrity sha512-IiHYZ+88m5MCoAyOHWQ4xXzecOh6FsDDr8lZpJktbFHyzYjBlIDQ6z9cJg+3ApApfo5Xosnmzjs27kf7wG2L0w==

"@xterm/[email protected]":
version "0.19.0-beta.21"
resolved "https://registry.yarnpkg.com/@xterm/addon-webgl/-/addon-webgl-0.19.0-beta.21.tgz#68b92a47bf6768babd57bfbaf3ac97a7c670d8df"
integrity sha512-YV8Aaxp4QokXXehSCJ7NvudZKPDyBiXv4HqENqDpQllCj4hOWC5xJYSoFoPtu5+UhlzfqqvYRX/Il7QegPFPDg==

"@xterm/[email protected]":
version "5.6.0-beta.21"
resolved "https://registry.yarnpkg.com/@xterm/headless/-/headless-5.6.0-beta.21.tgz#110fa33b59f4bf2d1de188e318bb944c8d774e97"
integrity sha512-RtKsv7KZb/ee8hwkvMNYuUofDoBR/KWUjoB5mo10C+dHyDJcMYiG2k48cAvcaJRjPH721iOELORKQk3NAlowkg==

"@xterm/[email protected]":
version "5.6.0-beta.21"
resolved "https://registry.yarnpkg.com/@xterm/xterm/-/xterm-5.6.0-beta.21.tgz#87a4e45752e5708cffc5c583d7f15e107313eb4e"
integrity sha512-1tLJaGudNSg1hEC+ZwUU7PiUvzURzKB5v1IRaJdmZK81ZCxvEF6Qfo281pTZsZFnv2iOWqFEC0C5uRmBXLm0lQ==

agent-base@^7.0.1, agent-base@^7.0.2, agent-base@^7.1.0:
version "7.1.0"
Expand Down Expand Up @@ -347,6 +354,11 @@ is-number@^7.0.0:
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==

js-base64@^3.7.5:
version "3.7.7"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-3.7.7.tgz#e51b84bf78fbf5702b9541e2cb7bfcb893b43e79"
integrity sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==

[email protected]:
version "3.1.2"
resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-3.1.2.tgz#9bf4364deba0677fe9e3bd9e29eda57febf2e9db"
Expand Down
1 change: 1 addition & 0 deletions scripts/xterm-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const path = require('path');

const moduleNames = [
'@xterm/xterm',
'@xterm/addon-clipboard',
'@xterm/addon-image',
'@xterm/addon-search',
'@xterm/addon-serialize',
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
'vscode-oniguruma': `${baseNodeModulesPath}/vscode-oniguruma/release/main.js`,
'vsda': `${baseNodeModulesPath}/vsda/index.js`,
'@xterm/xterm': `${baseNodeModulesPath}/@xterm/xterm/lib/xterm.js`,
'@xterm/addon-clipboard': `${baseNodeModulesPath}/@xterm/addon-clipboard/lib/addon-clipboard.js`,
'@xterm/addon-image': `${baseNodeModulesPath}/@xterm/addon-image/lib/addon-image.js`,
'@xterm/addon-search': `${baseNodeModulesPath}/@xterm/addon-search/lib/addon-search.js`,
'@xterm/addon-serialize': `${baseNodeModulesPath}/@xterm/addon-serialize/lib/addon-serialize.js`,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { ClipboardAddon, type ClipboardSelectionType, type IClipboardProvider } from '@xterm/addon-clipboard';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';

export class VscodeClipboardAddon extends ClipboardAddon {
constructor(
@IInstantiationService instantiationService: IInstantiationService
) {
super(undefined, instantiationService.createInstance(VscodeClipboardProvider));
}
}

class VscodeClipboardProvider implements IClipboardProvider {
constructor(
@IClipboardService private readonly _clipboardService: IClipboardService
) {
}

public async readText(type: ClipboardSelectionType): Promise<string> {
return this._clipboardService.readText(type === 'p' ? 'selection' : 'clipboard');
}

public async writeText(type: ClipboardSelectionType, text: string): Promise<void> {
return this._clipboardService.writeText(text, type === 'p' ? 'selection' : 'clipboard');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type { Unicode11Addon as Unicode11AddonType } from '@xterm/addon-unicode1
import type { WebglAddon as WebglAddonType } from '@xterm/addon-webgl';
import type { SerializeAddon as SerializeAddonType } from '@xterm/addon-serialize';
import type { ImageAddon as ImageAddonType } from '@xterm/addon-image';
import type { ClipboardAddon as ClipboardAddonType } from '@xterm/addon-clipboard';
import * as dom from 'vs/base/browser/dom';
import { IXtermCore } from 'vs/workbench/contrib/terminal/browser/xterm-private';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
Expand Down Expand Up @@ -39,6 +40,7 @@ import { MouseWheelClassifier } from 'vs/base/browser/ui/scrollbar/scrollableEle
import { IMouseWheelEvent, StandardWheelEvent } from 'vs/base/browser/mouseEvent';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { AccessibilitySignal, IAccessibilitySignalService } from 'vs/platform/accessibilitySignal/browser/accessibilitySignalService';
import { VscodeClipboardAddon } from 'vs/workbench/contrib/terminal/browser/xterm/vscodeClipboardAddon';

const enum RenderConstants {
SmoothScrollDuration = 125
Expand Down Expand Up @@ -117,6 +119,7 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach
private _markNavigationAddon: MarkNavigationAddon;
private _shellIntegrationAddon: ShellIntegrationAddon;
private _decorationAddon: DecorationAddon;
private _clipboardAddon: ClipboardAddonType;

// Optional addons
private _searchAddon?: SearchAddonType;
Expand Down Expand Up @@ -273,6 +276,8 @@ export class XtermTerminal extends Disposable implements IXtermTerminal, IDetach
this.raw.loadAddon(this._decorationAddon);
this._shellIntegrationAddon = new ShellIntegrationAddon(shellIntegrationNonce, disableShellIntegrationReporting, this._telemetryService, this._logService);
this.raw.loadAddon(this._shellIntegrationAddon);
this._clipboardAddon = this._instantiationService.createInstance(VscodeClipboardAddon);
this.raw.loadAddon(this._clipboardAddon);

this._anyTerminalFocusContextKey = TerminalContextKeys.focusInAny.bindTo(contextKeyService);
this._anyFocusedTerminalHasSelection = TerminalContextKeys.textSelectedInFocused.bindTo(contextKeyService);
Expand Down
Loading

0 comments on commit 30e7857

Please sign in to comment.