Skip to content

Commit

Permalink
Support IMEs
Browse files Browse the repository at this point in the history
Currently using the xterm.js PR branch

Fixes #7045
  • Loading branch information
Tyriar committed Jul 18, 2016
1 parent 8a91288 commit 52f8f8e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 14 deletions.
4 changes: 2 additions & 2 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"vscode-debugprotocol": "1.10.0",
"vscode-textmate": "2.0.1",
"winreg": "1.2.0",
"xterm": "git+https://github.com/sourcelair/xterm.js.git#8790a94",
"xterm": "git://github.com/Tyriar/xterm.js#124_add_textarea_back",
"yauzl": "2.3.1"
},
"devDependencies": {
Expand Down
54 changes: 43 additions & 11 deletions src/vs/workbench/parts/terminal/electron-browser/media/xterm.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,59 @@
position: relative;
}

.monaco-workbench .panel.integrated-terminal .xterm:focus {
.monaco-workbench .panel.integrated-terminal .xterm.focus {
outline: none;
}

.hc-black .monaco-workbench .panel.integrated-terminal .xterm:focus {
.hc-black .monaco-workbench .panel.integrated-terminal .xterm.focus {
outline: 2px solid #f38518;
}

.monaco-workbench .panel.integrated-terminal .xterm .xterm-helpers {
position: absolute;
top: 0;
}

.monaco-workbench .panel.integrated-terminal .xterm .xterm-helper-textarea {
position: absolute;
/*
* HACK: to fix IE's blinking cursor
* Move textarea out of the screen to the far left, so that the cursor is not visible.
*/
left: -9999em;
opacity: 0;
width: 0;
height: 0;
z-index: -10;
}

.monaco-workbench .panel.integrated-terminal .reverse-video { color: #1e1e1e; }
.vs-dark .monaco-workbench .panel.integrated-terminal .reverse-video { color: #CCC; }
.hc-black .monaco-workbench .panel.integrated-terminal .reverse-video { color: #FFF; }

.monaco-workbench .panel.integrated-terminal .xterm:focus .terminal-cursor { background-color: #333; }
.vs-dark .monaco-workbench .panel.integrated-terminal .xterm:focus .terminal-cursor { background-color: #CCC; }
.hc-black .monaco-workbench .panel.integrated-terminal .xterm:focus .terminal-cursor { background-color: #FFF; }
.monaco-workbench .panel.integrated-terminal .xterm.focus .terminal-cursor { background-color: #333; }
.vs-dark .monaco-workbench .panel.integrated-terminal .xterm.focus .terminal-cursor { background-color: #CCC; }
.hc-black .monaco-workbench .panel.integrated-terminal .xterm.focus .terminal-cursor { background-color: #FFF; }

.monaco-workbench .panel.integrated-terminal .xterm:not(:focus) .terminal-cursor {
.monaco-workbench .panel.integrated-terminal .xterm:not(.focus) .terminal-cursor {
background-color: transparent;
outline: 1px solid #333;
outline-offset: -1px;
}
.vs-dark .monaco-workbench .panel.integrated-terminal .xterm:not(:focus) .terminal-cursor {
.vs-dark .monaco-workbench .panel.integrated-terminal .xterm:not(.focus) .terminal-cursor {
background-color: transparent;
outline: 1px solid #CCC;
outline-offset: -1px;
}
.hc-black .monaco-workbench .panel.integrated-terminal .xterm:not(:focus) .terminal-cursor {
.hc-black .monaco-workbench .panel.integrated-terminal .xterm:not(.focus) .terminal-cursor {
background-color: transparent;
outline: 1px solid #FFF;
outline-offset: -1px;
}

.monaco-workbench .panel.integrated-terminal .xterm:focus .terminal-cursor.blinking { animation: blink-cursor 1.2s infinite step-end; }
.vs-dark .monaco-workbench .panel.integrated-terminal .xterm:focus .terminal-cursor.blinking { animation: blink-cursor-dark 1.2s infinite step-end; }
.hc-black .monaco-workbench .panel.integrated-terminal .xterm:focus .terminal-cursor.blinking { animation: blink-cursor-hc-black 1.2s infinite step-end; }
.monaco-workbench .panel.integrated-terminal .xterm.focus .terminal-cursor.blinking { animation: blink-cursor 1.2s infinite step-end; }
.vs-dark .monaco-workbench .panel.integrated-terminal .xterm.focus .terminal-cursor.blinking { animation: blink-cursor-dark 1.2s infinite step-end; }
.hc-black .monaco-workbench .panel.integrated-terminal .xterm.focus .terminal-cursor.blinking { animation: blink-cursor-hc-black 1.2s infinite step-end; }

@keyframes blink-cursor {
0% {
Expand Down Expand Up @@ -101,6 +119,20 @@
visibility: hidden;
}

/* Composition view */

.terminal .composition-view {
background: #000;
color: #FFF;
display: none;
position: absolute;
white-space: nowrap;
}

.terminal .composition-view.active {
display: block;
}

/* Base selection colors */

.monaco-workbench .panel.integrated-terminal .xterm *::selection {
Expand Down

0 comments on commit 52f8f8e

Please sign in to comment.