diff options
author | Aleš Smodiš <aless@guru.si> | 2015-09-15 20:20:33 +0200 |
---|---|---|
committer | Aleš Smodiš <aless@guru.si> | 2015-09-15 20:20:33 +0200 |
commit | fc502942d67e9d9854a2ef5a67dcadd831a75b28 (patch) | |
tree | 2af16b51d12c5cba761fb0de4a16e2acbc5a6e66 | |
parent | e481326ffd15c7dd7f9878cc9f4f94b41021ac1a (diff) |
A few terminal newline fixes for Prolog.
-rw-r--r-- | js/prolog.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/js/prolog.js b/js/prolog.js index cc46736..730e740 100644 --- a/js/prolog.js +++ b/js/prolog.js @@ -93,16 +93,16 @@ var t, lines, i; if (data.code === 0) { t = data.terminal; - terminal.append(t.messages.join('\n') + '\n', 'output'); + terminal.append(t.messages.join('\n'), 'output'); promptMode = !t.have_more; } else { - terminal.error(data.message + '\n', 'error'); + terminal.error(data.message, 'error'); promptMode = true; } if (promptMode) { terminal.setLineBuffered(); - terminal.append('?- ', 'output'); + terminal.append('\n?- ', 'output'); } }, tcf = function terminalCommandFailed (error) { @@ -137,6 +137,7 @@ }, problem_id).then(tcs, tcf); } else { + terminal.append('\n'); if (command == ';') { // show next answer return codeq.comms.sendQuery({ |