wavesoft / local-echo

A local-echo controller for xterm.js
Apache License 2.0
142 stars 71 forks source link

Errors and bugs while entering text #1

Closed m4l3vich closed 6 years ago

m4l3vich commented 6 years ago

Entering text causes error: image

At this line (local-echo.js formatted by Chrome devtools): image

Using this code: image And some Vue.js with Electron

m4l3vich commented 6 years ago

That's what debugger shows: image As you can see, term is defined, but only under this

m4l3vich commented 6 years ago

Also found that if you use colors (like \u001b[36;1m) in prompt, cursor position becomes incorrect image image

m4l3vich commented 6 years ago

This can be fixed by inserting .replace(/\033\[[0-9;]*m/, '') somewhere where the cursor position is being calculated, but I'm not sure where exactly to insert it.