projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSD 4_1_snap release
[unix-history]
/
usr
/
src
/
lib
/
libcurses
/
insertln.c
diff --git
a/usr/src/lib/libcurses/insertln.c
b/usr/src/lib/libcurses/insertln.c
index
6c4a074
..
bc453ca
100644
(file)
--- a/
usr/src/lib/libcurses/insertln.c
+++ b/
usr/src/lib/libcurses/insertln.c
@@
-4,7
+4,7
@@
* 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
+ *
4/17/81 (Berkeley) @(#)insertln.c 1.4
*/
winsertln(win)
reg WINDOW *win; {
*/
winsertln(win)
reg WINDOW *win; {
@@
-24,4
+24,13
@@
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;
}
}