jroimartin / gocui

Minimalist Go package aimed at creating Console User Interfaces.
BSD 3-Clause "New" or "Revised" License
9.92k stars 608 forks source link

Extra character outputted when typing #80

Closed awnumar closed 8 years ago

awnumar commented 8 years ago

This (bug?) isn't immediately obvious, but it pops its head up on Windows especially.

When typing, there's an extra character that is outputted where your cursor is. You can make it more obvious by activating the mask in _examples/mask.go and typing. Pressing the delete key removes this extra character. In Linux it's invisible but in windows it shows up, I'm thinking maybe it's an ANSI escape code?

Copying it from my Linux terminal just tells me it's an extra U+0020 : SPACE [SP], but that wouldn't explain why it shows up as a visible (albeit fucked up) character in Windows. Either way, it shouldn't be there.

jroimartin commented 8 years ago

Duplicates: #69 Relates to: #60

awnumar commented 8 years ago

Are you sure that it's a NULL at the end of the line? Like I said, copying it seems to show that it's a \x20 (SPACE).

jroimartin commented 8 years ago

Yes, it should. I'm referring to the internal representation.