oyvindberg / tui-scala

Beautiful Text-based User Interfaces for Scala
MIT License
207 stars 11 forks source link

Reset canonical terminal after finishing the program. #54

Closed igor-ramazanov closed 1 year ago

igor-ramazanov commented 1 year ago

If a program finishes, then the terminal keeps staying in the Raw mode.

Would be nice to put it back into the canonical state.

Useful link: https://viewsourcecode.org/snaptoken/kilo/02.enteringRawMode.html

igor-ramazanov commented 1 year ago

Oh wait, I guess I can do that already by myself.

igor-ramazanov commented 1 year ago

Yes, you already do that: https://github.com/oyvindberg/tui-scala/blob/master/tui/src/scala/tui/withTerminal.scala#L19

For some reason does not work for me, but likely the issue on my side.

Appreciate the repo!