antirez / load81

SDL based Lua programming environment for kids similar to Codea
BSD 2-Clause "Simplified" License
599 stars 62 forks source link

BUG: Editor failure if too many Backspaces entered rapidly #45

Open seclorum opened 12 years ago

seclorum commented 12 years ago

Last night while editing my joystick.lua example in the editor, I had the situation where I had to delete a lot of lines of code. I positioned the cursor at the very end of the file, and held down the Backspace key. Things started to delete when suddenly the entire screen was filled with junk chars, and the editor GUI state was corrupted. The file buffer was okay - I was able to save and re-edit the file, with some chars deleted (no junk in the file, confirmed at the cmd-line with 'cat joystick.lua' before re-starting LOAD81), but the editor state seemed to not like having to deal with a large number of commented-out lines during the delete process.

This was reproducible - I tried again, deleting 4 long lines that had been previously commented out, and the editor GUI state went corrupt again. Seems to be some interaction between key-repeat/Backspace/comment-line color-encoding.