<commit_before>import React from 'react';
import Terminal from '../Terminal';
import TerminalComponent from './terminal';

export default React.createClass({
    getInitialState() {
        let terminal = new Terminal(getDimensions());
        $(window).resize(() => terminal.resize(getDimensions()));

        return {terminals: [terminal]};
    },
    handleKeyDown(event) {
        // Cmd+_.
        if (event.metaKey && event.keyCode === 189) {
            console.log('Split horizontally.');

            event.stopPropagation();
            event.preventDefault();
        }

        // Cmd+|.<commit_msg>Split horizontally.<commit_after>import React from 'react/addons';
import Terminal from '../Terminal';
import TerminalComponent from './terminal';

export default React.createClass({
    getInitialState() {
        return {terminals: [this.createTerminal()]};
    },
    createTerminal() {
        let terminal = new Terminal(getDimensions());
        $(window).resize(() => terminal.resize(getDimensions()));

        return terminal
    },
    handleKeyDown(event) {
        // Cmd+_.
        if (event.metaKey && event.keyCode === 189) {
            console.log('Split horizontally.');
            let terminal = new Terminal(getDimensions());
            $(window).resize(() => terminal.resize(getDimensions()));

            this.setState({
                terminals: React.addons.update(this.state.terminals, {$push: [this.createTerminal()]})
            });

            event.stopPropagation();
            event.preventDefault();
        }

        // Cmd+|.
{'fraction_non_alphanumeric': 0.15019011406844107, 'fraction_numerical': 0.0038022813688212928, 'mean_word_length': 2.4251626898047722, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3186909', 'n_tokens_mistral': 429, 'n_tokens_neox': 405, 'n_words': 86}