diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 11f88b4b51dc7..d0c284a235e16 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -429,8 +429,8 @@ }, "xterm": { "version": "1.0.0", - "from": "git+https://github.com/sourcelair/xterm.js.git#e7c7160", - "resolved": "git+https://github.com/sourcelair/xterm.js.git#e7c7160f8549eede0f069d3b8512642f3498f9fe" + "from": "git+https://github.com/sourcelair/xterm.js.git#65b2be7", + "resolved": "git+https://github.com/sourcelair/xterm.js.git#65b2be78315e0c83defb7d8358eb0282a18024a0" }, "yauzl": { "version": "2.3.1", diff --git a/package.json b/package.json index dc5ecc450ed66..acd4b8f311c79 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "vscode-debugprotocol": "1.11.0", "vscode-textmate": "2.0.1", "winreg": "1.2.0", - "xterm": "git+https://github.com/sourcelair/xterm.js.git#e7c7160", + "xterm": "git+https://github.com/sourcelair/xterm.js.git#65b2be7", "yauzl": "2.3.1" }, "devDependencies": { diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/scrollbar.css b/src/vs/workbench/parts/terminal/electron-browser/media/scrollbar.css deleted file mode 100644 index 1b99a5d61d65d..0000000000000 --- a/src/vs/workbench/parts/terminal/electron-browser/media/scrollbar.css +++ /dev/null @@ -1,40 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -.monaco-workbench .panel.integrated-terminal .xterm-viewport { - /* Use the hack presented in http://stackoverflow.com/a/38748186/1156119 to get opacity transitions working on the scrollbar */ - background-color: rgba(121, 121, 121, 0); - -webkit-background-clip: text; - -webkit-text-fill-color: transparent; - transition: background-color 800ms linear; -} - -.monaco-workbench .panel.integrated-terminal .xterm-viewport::-webkit-scrollbar { - width: 10px; -} - -.monaco-workbench .panel.integrated-terminal .xterm-viewport::-webkit-scrollbar-track { - opacity: 0; -} - -.monaco-workbench .panel.integrated-terminal .xterm-viewport::-webkit-scrollbar-thumb { - background-color: inherit; -} - -.monaco-workbench .panel.integrated-terminal .xterm.focus .xterm-viewport, -.monaco-workbench .panel.integrated-terminal .xterm:focus .xterm-viewport, -.monaco-workbench .panel.integrated-terminal .xterm:hover .xterm-viewport { - transition: opacity 100ms linear; - background-color: rgba(121, 121, 121, 0.4); -} - -.monaco-workbench .panel.integrated-terminal .xterm .xterm-viewport::-webkit-scrollbar-thumb:hover { - transition: opacity 0ms linear; - background-color: rgba(100, 100, 100, .7); -} - -.monaco-workbench .panel.integrated-terminal .xterm .xterm-viewport::-webkit-scrollbar-thumb:window-inactive { - background-color: inherit; -} \ No newline at end of file diff --git a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css index 6f8e580c7c0a5..b3eaa0b5db0a7 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css +++ b/src/vs/workbench/parts/terminal/electron-browser/media/xterm.css @@ -119,27 +119,6 @@ } } -.monaco-workbench .panel.integrated-terminal .xterm .xterm-viewport { - overflow-y: scroll; -} - -.monaco-workbench .panel.integrated-terminal .xterm .xterm-rows { - position: absolute; - left: 0; - bottom: 0; -} - -.monaco-workbench .panel.integrated-terminal .xterm .xterm-scroll-area { - visibility: hidden; -} - -.monaco-workbench .panel.integrated-terminal .xterm .xterm-char-measure-element { - display: inline-block; - visibility: hidden; - position: absolute; - left: -9999em; -} - .monaco-workbench .panel.integrated-terminal .xterm .xterm-bold { font-weight: bold; } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index 0392f5b768f52..85f3566256943 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -3,7 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import 'vs/css!./media/scrollbar'; import 'vs/css!./media/terminal'; import 'vs/css!./media/xterm'; import * as panel from 'vs/workbench/browser/panel'; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 3f91f712c3c3a..a7e3f6dbb3ed6 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -135,13 +135,10 @@ export class TerminalInstance { if (!dimension.height) { // Minimized return; } - let leftPadding = parseInt(getComputedStyle(document.querySelector('.terminal-outer-container')).paddingLeft.split('px')[0], 10); - let innerWidth = dimension.width - leftPadding; - let cols = Math.floor(innerWidth / this.font.charWidth); + let cols = Math.floor(dimension.width / this.font.charWidth); let rows = Math.floor(dimension.height / this.font.charHeight); if (this.xterm) { this.xterm.resize(cols, rows); - this.xterm.element.style.width = innerWidth + 'px'; } if (this.terminalProcess.process.connected) { this.terminalProcess.process.send({