johnnovak / illwill

A curses inspired simple cross-platform console library for Nim
Do What The F*ck You Want To Public License
398 stars 27 forks source link

If terminal is too small, error thrown #23

Open codic12 opened 3 years ago

codic12 commented 3 years ago

Not really a bug, but I get something like:

/home/user/e.nim(71)     e
/home/user/e.nim(66)     main
/home/user/e.nim(44)     updateScreen
/usr/lib/nim/system/fatal.nim(49) sysFatal
Error: unhandled exception: value out of range: -1 notin 0 .. 9223372036854775807 [RangeDefect]

whenever I resize the screen to something too small. this makes sense, and I know I can error handle it, but I'm curious where it occurs so that I could avoid blanket error handling all of it? Maybe Illwill could throw a better error

johnnovak commented 3 years ago

Based on the stacktrace, this seems to be happening in your code, not in illwill.

codic12 commented 3 years ago

I can see it in the examples though.

johnnovak commented 3 years ago

I can see it in the examples though.

Ok I'll have a look at them.