                 matchBrackets: true
 
             @codemirror.setSize '100%', 'auto'
+            @codemirror.setValue @saved_query
 
         handle_gutter_click: (editor, line) =>
             start =

        alert_reconnection_success_template: Handlebars.compile $('#alert-reconnection_success-template').html()
        databases_suggestions_template: Handlebars.compile $('#dataexplorer-databases_suggestions-template').html()
        namespaces_suggestions_template: Handlebars.compile $('#dataexplorer-namespaces_suggestions-template').html()

        events:
            'click .CodeMirror': 'handle_keypress'


        # Make suggestions when the user is writing
        handle_keypress: (editor, event) =>
            DataExplorerView.Container.prototype.saved_query = @codemirror.getValue()
            saved_cursor = @codemirror.getCursor()
            if event?.which?
                # If the user hit tab, we switch the highlighted suggestion
