merge from develop
[jalview.git] / src / jalview / appletgui / AppletJmol.java
index e889467..0379615 100644 (file)
@@ -558,7 +558,7 @@ public class AppletJmol extends EmbmenuFrame implements
     if (evt.getKeyCode() == KeyEvent.VK_ENTER && scriptWindow.isVisible())
     {
       jmb.eval(inputLine.getText());
-      history.append("\n$ " + inputLine.getText());
+      addToHistory("$ " + inputLine.getText());
       inputLine.setText("");
     }
 
@@ -701,4 +701,18 @@ public class AppletJmol extends EmbmenuFrame implements
     }
     return ap;
   }
+
+  /**
+   * Append the given text to the history object
+   * 
+   * @param text
+   */
+  public void addToHistory(String text)
+  {
+    // actually currently never initialised
+    if (history != null)
+    {
+      history.append("\n" + text);
+    }
+  }
 }