Commit 812d202
committed
Fix REPL prompt corruption
For some reason, `pop-to-buffer` with Emacs 25.1 after `make-comint`
results in corrupted prompt with strange ANSI control sequence.
For example, when feeding `class Foo {}` and enter key, the input is echoed
with the following character sequence
~~~
class Foo {}^[[1G^[[2m 1> ^[[22m^[[18G
~~~
which would be interpreted by a terminal like this
~~~
1> Foo {}
~~~
This is not desirable.
FYI, each sequence means as follows:
|sequence |meaning |
|---------|-----------------|
|`^[[1G` |Goto 1st column |
|`^[[2m` |Use faint color |
|`^[[22m` |Use normal color |
|`^[[18G` |Goto 18th column |
Curiously, while invoking `swift` command from `shell` mode works fine,
it will be corrupted with the following steps:
1. Start `shell` mode.
2. Type `M-x`.
3. Cancel the minibuffer with `C-g`.
4. Invoke `swift` command from the shell.
I could not find the cause nor why this workaround works.1 parent 58f31cc commit 812d202
1 file changed
+14
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
0 commit comments