elunico / WordnikCLI

A program for getting simple definitions for English words on the command line using Wordnik
MIT License
0 stars 0 forks source link

error in `addwstr()` #5

Open elunico opened 5 years ago

elunico commented 5 years ago

when terminal is set to 80x24 and the user tried to define delete it causes the following error:

_curses.error: addwstr() returned ERR
File "/home/thomas/Dropbox/Ubuntu/CodeProjects/PersonalProjects/define/buffer.py", line 90, in render: self.win.addstr(result[i], ats)
elunico commented 5 years ago

This happens due to an inaccurate line count in the render() method of buffer. The method believes that a new line character at result[487] is wrapping from line 20 to 21 when it is actually wrapping from line 22 to 23

elunico commented 4 years ago

A similar issue seems to be happening when the terminal is 89x25 and you define hello