From fc502942d67e9d9854a2ef5a67dcadd831a75b28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Smodi=C5=A1?= Date: Tue, 15 Sep 2015 20:20:33 +0200 Subject: A few terminal newline fixes for Prolog. --- js/prolog.js | 7 ++++--- 1 file 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({ -- cgit v1.2.1