Skip to content

Commit

Permalink
fix space in front of output in REPL #406
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Dec 23, 2024
1 parent 12917e0 commit f8b256c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### Bugfix
* fix exception when handling parse error for lonely `)` [#417](https://github.com/jcubic/lips/issues/417)
* fix unboxing arguments of LIPS created classes [#411](https://github.com/jcubic/lips/issues/411)
* fix space in front of output in REPL [#406](https://github.com/jcubic/lips/issues/406)

## 1.0.0-beta.20
### Feature
Expand Down
6 changes: 4 additions & 2 deletions bin/lips.js
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,9 @@ function run_repl(err, rl) {
// so we have the change to syntax highlight the command line
// this needs to happen on next tick so the string have time
// to updated with a given key
rl._refreshLine();
if (cmd) {
rl._refreshLine();
}
}, 0);
});
bootstrap(interp).then(function() {
Expand Down Expand Up @@ -714,9 +716,9 @@ function run_repl(err, rl) {
// https://github.com/nodejs/node/issues/11699
rl.setPrompt('');
rl.pause();
cmd = '';
prev_eval = prev_eval.then(function() {
const result = run(code, interp, dynamic, null, options.t || options.trace, false);
cmd = '';
return result;
}).then(function(result) {
if (process.stdin.isTTY) {
Expand Down

0 comments on commit f8b256c

Please sign in to comment.