- mvwaddstr(screen->scr.sub_ncw, win_lines - 1, 1,
- screen->lines[screen->scroll_y+win_lines-1]);
+ i = screen->scroll_y + win_lines - 1;
+ len = strncols(screen->lines[i]) > win_cols ? win_cols : -1;
+ mvwaddnstr(screen->scr.sub_ncw, win_lines - 1, 1,
+ screen->lines[i], len);