     uri = editor.getURI()
     line = editor.getLastCursor().getBufferRow()
     word = @getWordUnderCursor editor
+    @clearMessagePanel 'Idris: Make case ...'
 
     successHandler = ({ responseType, msg }) =>
       [clause] = @prefixLiterateClause msg
+
+      @hideAndClearMessagePanel()
 
       editor.transact ->
         # Delete old line, insert the new case block

    line = editor.getLastCursor().getBufferRow()
    word = @getWordUnderCursor editor

    successHandler = ({ responseType, msg }) =>
      [clause] = @prefixLiterateClause msg
      editor.transact ->
        editorHelper.moveToNextEmptyLine editor


      Logger.logText 'Idris: Shutting down!'
      @model.stop()
    @statusbar.destroy()

  # clear the message panel and optionally display a new title
  clearMessagePanel: (title) ->
    @messages.attach()
    @messages.show()
    @messages.clear()
    @messages.setTitle title, true if title?

  # hide the message panel
  hideAndClearMessagePanel: () ->
    @clearMessagePanel()
    @messages.hide()

  # get the word or operator under the cursor
  getWordUnderCursor: (editor) ->
