Skip to content

Commit

Permalink
Show output when eval
Browse files Browse the repository at this point in the history
  • Loading branch information
avli committed Sep 25, 2016
1 parent 469f8e2 commit 34554b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/clojureEval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,11 @@ export function clojureEval(context: vscode.ExtensionContext, outputChannel?: vs
diagnostics.clear();
nrepl1.evalFile(text, filename, (result) => {
console.log(result);
if (result.out) {
outputChannel.append(result.out);
outputChannel.show();
}
if (result.value) {
diagnostics.clear();
if (outputChannel) {
outputChannel.appendLine(`=> ${result.value}`);
outputChannel.show();
Expand All @@ -70,7 +73,7 @@ export function clojureEval(context: vscode.ExtensionContext, outputChannel?: vs
}
let errMsg = stackteace.message;

// Adjust error position if selection has been evaluated
// Adjust an error position if a selection has been evaluated
if (isSelection) {
errLine = errLine + selection.start.line;
errChar = errChar + selection.start.character;
Expand Down
2 changes: 1 addition & 1 deletion src/clojureMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function connect(context: vscode.ExtensionContext) {
context.workspaceState.update('port', port);
context.workspaceState.update('host', host);
updateConnectionIndicator(port, host);
vscode.window.showInformationMessage(onSuccesfullConnectMessage)
vscode.window.showInformationMessage(onSuccesfullConnectMessage);
} else {
vscode.window.showErrorMessage('Can\'t connect to the nREPL.');
}
Expand Down

0 comments on commit 34554b9

Please sign in to comment.