- || ((y = win->_cury - 1) >= 0 &&
- (x = win->_maxx) > 0)) {
- wchar_t *chars = (win->_line[y].text[x - 1].chars);
+ || (win->_maxx >= 0 && win->_cury >= 1)) {
+ if (x > 0 && y >= 0)
+ chars = (win->_line[y].text[x - 1].chars);
+ else
+ chars = (win->_line[y - 1].text[win->_maxx].chars);