Open DCNick3 opened 6 years ago
This seems to be caused by the implementation of the cursor (bin/getty.lua unblink and reblink function) in plan9k (but the bug might still be in ocvm). Commenting both functions out gives better (but still broken) results: please note the 'e' that was typed while the cursor was unblinked (ie. black)
this is definitely an ocvm bug, but as far as i can tell only affects plan9k.
on looking through source and docs it appears this is due to a subtle behavior bug in OCVM's gpu.setForeground
and gpu.setBackground
methods: they should return the old foreground/background color, but instead return the new one. interestingly OCEmu and Ocelot do this too - i haven't yet tested in-game, but given that Plan9k works there i'd say it's a safe bet that OC proper does do this correctly.
so OCEmu and Ocelot probably were returning the correct values and my tests were just bad. OCVM still was returning incorrect ones though - #51 now fixes that too.
ETA: here's plan9k with the fix (the cursor does blink, i just didn't time the screenshot quite right for it to show :p):
It looks like this in xterm (mintty gives similar results, so looks like this is not related to terminal)