MarvellousSoft / MarvInc

Zachlike with an immersive storyline told through emails.
https://marvellous.itch.io/marvellous-inc
GNU General Public License v3.0
54 stars 7 forks source link

editor deletes code sometimes #259

Open Norgus opened 5 years ago

Norgus commented 5 years ago

Sometimes when typing the letter "a", all of the code is deleted from the editor.

Strangely, ctrl+a does an all-select without deleting just fine.

Both times this has happened were after starting to write a # comment (which works most of the time, so this may be a fluke)

ctrl-z to undo and get back the deleted code works, but I have found no way to stop the bug besides closing the game and restarting it.

Environment is windows 10, steam, sometimes my keyboard layout is UK-qwerty and sometimes US-qwerty.

Norgus commented 5 years ago

OK I discovered it happens when I switch between keyboard layouts (which I do to get '#' to correspond to the actual printed key on my keyboard)

the symptom seems to actually be that the game interprets the CTRL key as remaining depressed (typing 'v' alone pastes text, for example)

Alt-tabbing out and back seems to fix it, so fairly minor issue now I can avoid it.

yancouto commented 5 years ago

Do you have a shortcut to change the layout that involves ctrl? That may be the cause. Or you just change it through GUI?

yancouto commented 5 years ago

This is weird because we manually get if ctrl is down at the moment you press 'a' (here) (instead of keeping track of key pressed and released), so maybe this is a LOVE bug?

rilifon commented 5 years ago

@Norgus can you help us, so we can fix this issue?

Norgus commented 5 years ago

The shortcut I use on my system is + , this brings up the windows IME switcher interface (not sure what else to call it), I keep the windows key depressed and press space one or more times to switch to the correct keyboard layout or input method before releasing.

This switch seems to reliably cause the bug. Could be something in the LOVE engine I suppose?