diff --git a/src/mercury/components/terminal-link.jsx b/src/mercury/components/terminal-link.jsx index 09484fd..0ab69d7 100644 --- a/src/mercury/components/terminal-link.jsx +++ b/src/mercury/components/terminal-link.jsx @@ -62,7 +62,7 @@ class TerminalLink extends React.Component { } } - onPaste(data: string) { + onPaste = (data: string) => { const command = this.getCurrentInputCommand(); this.props.updateCommand( command.slice(0, this.state.cursor) + @@ -73,12 +73,12 @@ class TerminalLink extends React.Component { this.setState({ cursor: this.state.cursor + data.length }); - } + }; getCurrentInputCommand() { const history = this.props.terminal.history; return history[this.state.historyIndex]; - } + }; handleKey = (e: SyntheticKeyboardEvent) => { const history = this.props.terminal.history;