Skip to content

Commit

Permalink
don't forget the query when query toolbar is hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaskrause committed Jun 10, 2015
1 parent 279b945 commit 7b99539
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ window.annis_gui_components_codemirror_AqlCodeEditor = function() {
var rootDiv = this.getElement(this.getConnectorId());

var changeDelayTimerID = null;
var lastSentText = "";

var changeDelayTime = 500;

Expand Down Expand Up @@ -53,7 +52,7 @@ window.annis_gui_components_codemirror_AqlCodeEditor = function() {
window.clearTimeout(changeDelayTimerID);
}

if(lastSentText !== current)
if(connector.getState().clientText !== current)
{
var cursor = cmTextArea.getCursor();
// calculate the absolute cursor position
Expand All @@ -66,7 +65,6 @@ window.annis_gui_components_codemirror_AqlCodeEditor = function() {
absPos += cursor.ch;

connector.textChanged(current, absPos);
lastSentText = current;
}
};

Expand All @@ -82,7 +80,7 @@ window.annis_gui_components_codemirror_AqlCodeEditor = function() {
cmTextArea.setOption('mode', newMode);
cmTextArea.setOption("placeholder", connector.getState().inputPrompt);

if(connector.getState().clientText !== connector.getState().text)
if(cmTextArea.getValue() !== connector.getState().text)
{
cmTextArea.setValue(connector.getState().text);

Expand Down

0 comments on commit 7b99539

Please sign in to comment.