| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ed3de08 commit 58b60fc
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -476,7 +476,7 @@ function REPLServer(prompt, | |||
| 476 | 476 | const matches = self._sawKeyPress ? cmd.match(/^\s+/) : null; | |
| 477 | 477 | if (matches) { | |
| 478 | 478 | const prefix = matches[0]; | |
| 479 | - self.inputStream.write(prefix); | ||
| 479 | + self.write(prefix); | ||
| 480 | 480 | self.line = prefix; | |
| 481 | 481 | self.cursor = prefix.length; | |
| 482 | 482 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -75,12 +75,15 @@ tests.forEach(run); | |||
| 75 | 75 | // Auto code alignment for .editor mode | |
| 76 | 76 | function testCodeAligment({input, cursor = 0, line = ''}) { | |
| 77 | 77 | const stream = new common.ArrayStream(); | |
| 78 | + const outputStream = new common.ArrayStream(); | ||
| 79 | + | ||
| 80 | + stream.write = () => { throw new Error('Writing not allowed!'); }; | ||
| 78 | 81 | ||
| 79 | 82 | const replServer = repl.start({ | |
| 80 | 83 | prompt: '> ', | |
| 81 | 84 | terminal: true, | |
| 82 | 85 | input: stream, | |
| 83 | - output: stream, | ||
| 86 | + output: outputStream, | ||
| 84 | 87 | useColors: false | |
| 85 | 88 | }); | |
| 86 | 89 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments