jtdaugherty / vty

A high-level ncurses alternative written in Haskell
BSD 3-Clause "New" or "Revised" License
319 stars 57 forks source link

Potential Bug (mkVty on ghci)? #263

Closed liamzee closed 1 year ago

liamzee commented 1 year ago

On ghci (ArchLinux, Konsole), trying foo <- mkVty defaultConfig results in terminal corruption, as vty starts eating inputs and causing weird behavior in the particular console.

Not sure if this is acceptable behavior, since mkVty documents "at most one handle should be made per terminal device", but vty has made no terminal devices, it's just clashing with ghci.

jtdaugherty commented 1 year ago

Hi @liamzee - this is expected behavior, and basically the issue is that mkVty is specifically for when you want to take control of the terminal and only use Vty to interact with it. So I don't recommend using mkVty in ghci because ghci already has control of the terminal: it is already in the process of accepting input and printing output. So you'll get exactly the result you see, which is two programs basically fighting over the terminal.