ggerganov/imtui

ctrl + c in imtui-example-ncurses0 mouse handler issue?

PhilipDeegan opened this issue · 2 comments

Hi there,

I just installed this to test it out, I tried running one of the examples, "imtui-example-ncurses0", if I ctrl+c during this, it appears to be killed, but if I move my mouse it continues to dump opcodes(?) to the shell

If I run the other example, "hnterm", and ctrl+c during that, it ends, and stops the mouse movement issues.

OS: debian testing (specifically https://crunchbangplusplus.org/oldindex.html)
DM: openbox

Exiting the program with Ctrl + C can leave the terminal in some weird state, because the endwin() function is never called.
I just added an "Exit" button to the example that should make the program quit gracefully:

0f8136d

image

You can try using that button instead of Ctrl + C

ok thanks