diff options
author | Robert Zorko <robertz@gurucue.com> | 2015-09-18 14:39:14 +0200 |
---|---|---|
committer | Robert Zorko <robertz@gurucue.com> | 2015-09-18 14:39:14 +0200 |
commit | 3eaecb641fd8328212e6c503bc056794f7290b17 (patch) | |
tree | aaea9a808718b572134ec907775895f6ac1627c4 /js/prolog.js | |
parent | c3898354b2e78ba30b363ecfa5dc4829d1279a7f (diff) |
changes for th latest changes
Diffstat (limited to 'js/prolog.js')
-rw-r--r-- | js/prolog.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/js/prolog.js b/js/prolog.js index 29ceb3d..fad1dd4 100644 --- a/js/prolog.js +++ b/js/prolog.js @@ -8,6 +8,7 @@ var makePrologTerminalHandler = function (jqConsole, editor, problem_id, activityHandler) { var promptMode = true, // default: query composition; alternative: query result browsing + manualStop = false, // if the user stopped showing next answers (false) or if there are no more answers (true) terminal = codeq.makeConsole(jqConsole, { 'greeting': 'CodeQ Prolog terminal proxy' }), @@ -24,7 +25,7 @@ } if (promptMode) { terminal.setLineBuffered(); - terminal.append('.\n?- ', 'output'); + terminal.append(manualStop ? '?- ' : '.\n?- ', 'output'); } }, tcf = function terminalCommandFailed (error) { @@ -49,6 +50,7 @@ terminal.onInput = function (command) { if (promptMode) { promptMode = false; + manualStop = false; terminal.setNotBuffered(); return codeq.comms.sendQuery({ 'problem_id': problem_id, @@ -70,6 +72,7 @@ } else { // stop searching for answers + manualStop = true; return codeq.comms.sendQuery({ 'problem_id': problem_id, 'step': 'end', |