diff options
author | steve <steve@FreeBSD.org> | 1997-12-29 03:29:29 +0000 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1997-12-29 03:29:29 +0000 |
commit | e40600458fdf7a84940f1de3103886173646b19b (patch) | |
tree | 10a6344bb6039938f79c57fa5f3482a26b8f5f22 /lib/libncurses | |
parent | 8ab3ac77d29a2c135e0f05f5563d3b5cc8ce1a18 (diff) | |
download | FreeBSD-src-e40600458fdf7a84940f1de3103886173646b19b.zip FreeBSD-src-e40600458fdf7a84940f1de3103886173646b19b.tar.gz |
Handle the condition where BS is typed while the cursor is
at the first position on either of the last two lines of the
screen. Ie. append contents of current line to the previous
line and scroll the next line's contents up.
PR: 5392
Submitted by: Kouichi Hirabayashi <kh@mogami-wire.co.jp>
Diffstat (limited to 'lib/libncurses')
-rw-r--r-- | lib/libncurses/lib_insdel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libncurses/lib_insdel.c b/lib/libncurses/lib_insdel.c index aca7cc3..73d7365 100644 --- a/lib/libncurses/lib_insdel.c +++ b/lib/libncurses/lib_insdel.c @@ -25,7 +25,9 @@ winsdelln(WINDOW *win, int n) if (n == 0) return OK; - if (n < 0 && win->_cury - n >= win->_maxy) + if (n == -1 && win->_cury == win->_maxy) + return wclrtoeol(win); + if (n < 0 && win->_cury - n > win->_maxy) /* request to delete too many lines */ /* should we truncate to an appropriate number? */ return ERR; |