Skip to content

there --interactive doesn't delete removed characters #9

@cefn

Description

@cefn

Hi there,

I have successfully used there to connect to my Micropython board ( https://vgkits.org/blog/2018/05/08/introductory-video-tutorial/ ) but while I think it's doing everything correctly under the hood, I find that the character grid in CMD.exe is not being updated to reflect deletion.

For example, if I type the word 'hello' into the Micropython prompt, then delete three characters, the cursor goes backwards until it's under the first 'l', but all the 'llo' letters remain visible. The same applies to the behaviour of delete. The remaining characters are redrawn one position to the left, but the disappearing character on the far right is never deleted.

When I press enter I get the reassuring indication that actually the 'llo' were in fact removed (the backspace key logic works) but the 'llo' was never removed from the local visual buffer...

Is this an issue which should properly be filed with colorama, assuming that the proper bytes are being received from the serial link, but that it is not updating the character grid properly for the ANSI codes? I am struggling to unpack the layers here and know which part is responsible for which.

Backspace

C:\Users\cefn\Downloads\mpy-repl-tool-master>python -m there --interactive
--- Patched Miniterm-MPY on COM3  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

MicroPython v1.9.3-8-g63826ac5c on 2017-11-01; ESP module with ESP8266
Type "help()" for more information.
>>> hello
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'he' is not defined
>>>

(Forward) Deletion

C:\Users\cefn\Downloads\mpy-repl-tool-master>python -m there --interactive
--- Patched Miniterm-MPY on COM3  115200,8,N,1 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---

MicroPython v1.9.3-8-g63826ac5c on 2017-11-01; ESP module with ESP8266
Type "help()" for more information.
>>> heooo
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'he' is not defined
>>>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions