bbcmicrobit / PythonEditor

A MicroPython editor for the BBC micro:bit that works with browsers.
https://python.microbit.org/
MIT License
196 stars 130 forks source link

Beta: Pasting text into REPL is not consistent #280

Open microbit-mark opened 4 years ago

microbit-mark commented 4 years ago

micro:bit support #24686

When attempting to copy/paste text into the REPL, eg a code snippet, the copied text is often incorrectly represented in the editor eg copying 'microbit program' results in 'ram ram ram' etc Screen Recording 2019-10-22 at 09 31 am

This isn't always the case and often the second or third attempt gets it right.

OSX Catalina Chrome 77

Maybe related to #253

microbit-sam commented 4 years ago

I'll see if upgrading hterm helps https://github.com/chromium/hterm/commit/5c9c211439aafba79cecb9f9c44962b6df3af452

microbit-mark commented 4 years ago

Feedback from the user was that

microbit-sam commented 4 years ago

chopping it up in 62 characters in every paste seems to work.

Ah cool, this is probably a limitation of DAPjs/WebUSB then. Max packet size is 64 bytes, so 62 chars + header info is probably the limit

I'll see what I can do to split and the queue the packets, as I think I'll need to do something similar to solve the 131->132 errors