Skip to content

Commit

Permalink
Port back to IME
Browse files Browse the repository at this point in the history
  • Loading branch information
yury committed Feb 20, 2018
1 parent 295cb52 commit 8969917
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 11 deletions.
4 changes: 3 additions & 1 deletion Resources/hterm_all.js
Original file line number Diff line number Diff line change
Expand Up @@ -7664,7 +7664,9 @@ hterm.Options = function(opt_copy) {
this.wraparound = opt_copy ? opt_copy.wraparound : true;
this.reverseWraparound = opt_copy ? opt_copy.reverseWraparound : false;
this.originMode = opt_copy ? opt_copy.originMode : false;
this.autoCarriageReturn = opt_copy ? opt_copy.autoCarriageReturn : false;
// iOS terminal change: need autoCarriageReturn now that commands output info
// this.autoCarriageReturn = opt_copy ? opt_copy.autoCarriageReturn : false;
this.autoCarriageReturn = opt_copy ? opt_copy.autoCarriageReturn : true;
this.cursorVisible = opt_copy ? opt_copy.cursorVisible : false;
this.cursorBlink = opt_copy ? opt_copy.cursorBlink : false;
this.insertMode = opt_copy ? opt_copy.insertMode : false;
Expand Down
17 changes: 8 additions & 9 deletions Resources/hterm_all.min.js

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

3 changes: 3 additions & 0 deletions Resources/hterm_all.patches.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ hterm.ScrollPort.prototype.decorate = function(div) {
'outline: none !important';

doc.body.appendChild(this.screen_);

this.ime_ = doc.createElement('ime')
this.screen_.appendChild(this.ime_);

this.screen_.addEventListener('scroll', this.onScroll_.bind(this));
this.screen_.addEventListener('wheel', this.onScrollWheel_.bind(this));
Expand Down
11 changes: 10 additions & 1 deletion Resources/term.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="viewport-fit=cover, width=device-width, height=device-height, initial-scale=1, user-scalable=no">
<script src="webfontloader.js"></script>
<link rel="stylesheet" type="text/css" href="term.css">
<script src="hterm_all.js"></script>
<script src="hterm_all.min.js"></script>
<script src="hterm_all.patches.js"></script>
<script src="term.js"></script>
<style>
Expand All @@ -26,6 +26,15 @@
* {
font-feature-settings: "liga" 0;
}

ime {
position: absolute;
display: block;
min-height: var(--hterm-charsize-height);
max-width: 100%;
z-index:1000;
overflow-wrap: break-word;
}
</style>
<body>
<div id="terminal"></div>
Expand Down
Loading

0 comments on commit 8969917

Please sign in to comment.