         save_to_server()
 
     render : ->
+        if not @props.terminal?
+            return <Loading />
         <Panel header={<h2> <Icon name='terminal' /> Terminal <span className='lighten'>(settings applied to newly opened terminals)</span></h2>}>
             <Row>
                 <Col xs=3>Font size (px)</Col>
                 <Col xs=9>
-                    <TerminalFontSize
-                        font_size = {@props.terminal?.font_size}
-                        onChange  = {(font_size)=>@handleChange(font_size:font_size)}
-                    />
+                    <NumberInput
+                        on_change = {(font_size)=>@handleChange(font_size:font_size)}
+                        min       = 3
+                        max       = 80
+                        number    = {@props.terminal.font_size} />
                 </Col>
             </Row>
             <Row>

    line_numbers               : "show line numbers"
    code_folding               : "fold code using control+Q"
    smart_indent               : "context sensitive indentation"
    electric_characters        : "sometimes reindent current line"
    match_brackets             : "highlight matching brackets near cursor"
    auto_brackets              : "automatically close brackets"
    match_xml_tags             : "automatically match XML tags"
    auto_xml_tags              : "automatically close XML tags"
    delete_trailing_whitespace : "remove whenever file is saved"
    show_trailing_whitespace   : "show spaces at ends of lines"
    spaces_instead_of_tabs     : "send 4 spaces when the tab key is pressed"
    history_log                : "record all changes when editing files"
    extra_button_bar           : "more editing functions (mainly in Sage worksheets)"

EditorSettings = rclass
    label_checkbox: (name, desc) ->
        return misc.capitalize(name.replace(/_/g,' ')) + ": " + desc

    render_checkboxes: ->
        for name, desc of EDITOR_SETTINGS_CHECKBOXES
            <Input key={name} type='checkbox' label={@label_checkbox(name, desc)}/>

    render: ->
        <Panel header={<h2> <Icon name='edit' /> Editor</h2>}>
            {@render_checkboxes()}
        </Panel>

KEYBOARD_SHORTCUTS =
    "Next file tab"     : "control+]"

        @props.onChange?(@refs.input.getValue())
    render_options: ->
        for x in terminal_color_schemes
            <option selected={@props.color_scheme == x.value} key={x.value} value={x.value}>{x.display}</option>
    render : ->
        <Input type='select' ref='input' onChange={@handleChange}>
            {@render_options()}
        </Input>

TerminalFontFamily = rclass
    propTypes:
