SCCS-vsn: lib/libcurses/insertln.c 1.4
* This routine performs an insert-line on the window, leaving
* (_cury,_curx) unchanged.
*
* This routine performs an insert-line on the window, leaving
* (_cury,_curx) unchanged.
*
- * %G% (Berkeley) @(#)insertln.c 1.3
+ * %G% (Berkeley) @(#)insertln.c 1.4
*/
winsertln(win)
reg WINDOW *win; {
*/
winsertln(win)
reg WINDOW *win; {
for (end = &temp[win->_maxx]; temp < end; )
*temp++ = ' ';
win->_y[win->_cury] = temp - win->_maxx;
for (end = &temp[win->_maxx]; temp < end; )
*temp++ = ' ';
win->_y[win->_cury] = temp - win->_maxx;
+ if (win->_cury == LINES - 1 && win->_y[LINES-1][COLS-1] != ' ')
+ if (win->_scroll) {
+ wrefresh(win);
+ scroll(win);
+ win->_cury--;
+ }
+ else
+ return ERR;
+ return OK;