                         x.history = immutable.Stack([initial])
                     if not x.editing
                         x.editing = {}
+                    if not x.show_history
+                        x.show_history = {}
                     v[x.date - 0] = x
 
                 actions.setState(messages : immutable.fromJS(v))

        @props.actions.save_scroll_state(node.scrollTop, node.scrollHeight, node.offsetHeight)
        e.preventDefault()

    componentDidMount: ->
        @scroll_to_position()

    componentWillReceiveProps: (next) ->
        if @props.messages != next.messages and @is_at_bottom()
            @_use_saved_position = false

    componentDidUpdate: ->
        if not @_use_saved_position
            @scroll_to_bottom()


                                file_path    = {if @props.path? then misc.path_split(@props.path).head}
                                actions      = {@props.actions}
                                show_heads   = true />
                            {@render_preview_message() if @props.input.length > 0 and @state.is_preview_on}
                        </Panel>
                    </Col>
                </Row>
