Skip to content
This repository has been archived by the owner on Sep 2, 2019. It is now read-only.

Commit

Permalink
mv: deos -> tao
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew T. DeSantis committed Dec 21, 2016
1 parent 8d4b588 commit 8688505
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
1 change: 0 additions & 1 deletion app/terminal/lib/actions/sessions.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ export function addSessionData(uid, data) {

const enterKey = Boolean(data.match(/\n/));
const url = enterKey ? isUrl(shell, data) : null;

if (url) {
dispatch({
type: SESSION_URL_SET,
Expand Down
49 changes: 25 additions & 24 deletions app/terminal/lib/components/term.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ export default class Term extends Component {
this.handleMouseUp = this.handleMouseUp.bind(this);
this.handleScrollEnter = this.handleScrollEnter.bind(this);
this.handleScrollLeave = this.handleScrollLeave.bind(this);
this.handleFocus = this.handleFocus.bind(this);
this.onHyperCaret = this.onHyperCaret.bind(this);
this.handleKeyDown = this.handleKeyDown.bind(this);
this.handleFocus = this.handleFocus.bind(this);
props.ref_(this);
}

Expand Down Expand Up @@ -121,14 +122,6 @@ export default class Term extends Component {
this.scrollMouseEnter = false;
}

handleFocus() {
// This will in turn result in `this.focus()` being
// called, which is unecessary.
// Should investigate if it matters.
this.props.onActive();
this.term.focusHyperCaret();
}

handleMouseUp() {
this.props.onActive();
// this makes sure that we focus the hyper caret only
Expand All @@ -139,6 +132,18 @@ export default class Term extends Component {
this.term.focusHyperCaret();
}
}
handleFocus() {
// This will in turn result in `this.focus()` being
// called, which is unecessary.
// Should investigate if it matters.
this.props.onActive();
}

handleKeyDown(e) {
if (e.ctrlKey && e.key === 'c') {
this.props.onURLAbort();
}
}

onHyperCaret(caret) {
this.hyperCaret = caret;
Expand Down Expand Up @@ -262,13 +267,10 @@ export default class Term extends Component {
// key input so that it doesn't conflict
// with the <webview>
if (nextProps.url) {
const io = this.term.io.push();
io.onVTKeystroke = io.sendString = str => {
if (str.length === 1 && str.charCodeAt(0) === 3 /* Ctrl + C */) {
this.props.onURLAbort();
}
};
this.term.io.push();
window.addEventListener('keydown', this.handleKeyDown);
} else {
window.removeEventListener('keydown', this.handleKeyDown);
this.term.io.pop();
}
}
Expand Down Expand Up @@ -349,6 +351,7 @@ export default class Term extends Component {
/>
{ this.props.url ?
<webview
key="hyper-webview"
src={this.props.url}
onFocus={this.handleFocus}
style={{
Expand All @@ -361,16 +364,14 @@ export default class Term extends Component {
height: '100%'
}}
/> :
[
<div key="hyper-caret" contentEditable className="hyper-caret" ref={this.onHyperCaret}/>,
<div // eslint-disable-line react/jsx-indent
key="scrollbar"
className={css('scrollbarShim')}
onMouseEnter={this.handleScrollEnter}
onMouseLeave={this.handleScrollLeave}
/>
]
<div // eslint-disable-line react/jsx-indent
key="scrollbar"
className={css('scrollbarShim')}
onMouseEnter={this.handleScrollEnter}
onMouseLeave={this.handleScrollLeave}
/>
}
<div key="hyper-caret" contentEditable className="hyper-caret" ref={this.onHyperCaret}/>
{ this.props.customChildren }
</div>);
}
Expand Down
6 changes: 3 additions & 3 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ EXIT_FAILURE() {
deos_bin() {
for path in .deos/bin/darwin .deos/bin/vagrant .deos/bin/travis
do
[ ! -f "$path/deos" ] && cp src/deos.py $path/deos
[ -f "$path/deos" ] && chmod +x $path/deos
[ ! -f "$path/tao" ] && cp src/tao.py $path/tao
[ -f "$path/tao" ] && chmod +x $path/tao
[ ! -f "$path/logger" ] && cp src/logger.py $path/logger
[ -f "$path/logger" ] && chmod +x $path/logger
[ ! -f "$path/print" ] && cp src/print.py $path/print
Expand Down Expand Up @@ -62,7 +62,7 @@ deos_darwin() {
deos_init
#deos_venv "darwin"
deos_bin
.deos/bin/darwin/deos
.deos/bin/darwin/tao
EXIT_SUCCESS
}

Expand Down
File renamed without changes.

0 comments on commit 8688505

Please sign in to comment.