Skip to content

Commit

Permalink
This fixes issue BetterThanTomorrow#280
Browse files Browse the repository at this point in the history
If an evaluation changes the namespace the change is populated back.
  • Loading branch information
cf committed Sep 23, 2019
1 parent 5c5218f commit 066048e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changes to Calva.
- [Support for custom project/workflow commands](https://github.com/BetterThanTomorrow/calva/issues/281)

## [Unreleased]
- [REPL ns prompt does not change with (ns ..) form](https://github.com/BetterThanTomorrow/calva/issues/280)
- [Better inline evaluation error reports with file context](https://github.com/BetterThanTomorrow/calva/issues/329)
- [Escape HTML in stdout and stderr in REPL window](https://github.com/BetterThanTomorrow/calva/issues/321)
- [Adding default message handler for the nrepl](https://github.com/BetterThanTomorrow/calva/issues/218)
Expand Down
4 changes: 4 additions & 0 deletions calva/repl-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ class REPLWindow {
})
try {
this.postMessage({ type: "repl-response", value: await this.evaluation.value, ns: this.ns = ns || this.evaluation.ns || this.ns });
if(this.evaluation.ns && this.ns != this.evaluation.ns) {
// the evaluation changed the namespace so set the new namespace.
this.setNamespace(this.evaluation.ns);
}
} catch (e) {
this.postMessage({ type: "repl-error", ex: e });
let stacktrace = await this.session.stacktrace();
Expand Down

0 comments on commit 066048e

Please sign in to comment.