Enable/disable undo/redo as appropriate

The menu item is now enabled/disabled depending on the context.

Closes #1.
Make the results pane uneditable
Fix bug when retrieving text

Need to access editorPane.textEditor and not just editorPane.