From 688af4b0a0f28c726e3230c122554bf962e69f62 Mon Sep 17 00:00:00 2001 From: Oleg Safiullin Date: Thu, 20 Jun 2002 10:18:30 +0000 Subject: undo last commit; deraadt@ --- usr.bin/talk/display.c | 13 +++++++------ usr.bin/talk/init_disp.c | 8 ++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/usr.bin/talk/display.c b/usr.bin/talk/display.c index 4963e14cf85..e25aa6c6b2c 100644 --- a/usr.bin/talk/display.c +++ b/usr.bin/talk/display.c @@ -1,4 +1,4 @@ -/* $OpenBSD: display.c,v 1.10 2002/06/20 06:13:56 form Exp $ */ +/* $OpenBSD: display.c,v 1.11 2002/06/20 10:18:29 form Exp $ */ /* $NetBSD: display.c,v 1.3 1994/12/09 02:14:13 jtc Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)display.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: display.c,v 1.10 2002/06/20 06:13:56 form Exp $"; +static char rcsid[] = "$OpenBSD: display.c,v 1.11 2002/06/20 10:18:29 form Exp $"; #endif /* not lint */ /* @@ -200,10 +200,11 @@ xscroll(win, flag) win->x_col = 0; return; } + win->x_line = (win->x_line + 1) % win->x_nlines; win->x_col = 0; - if (++win->x_line == win->x_nlines) { - --win->x_line; - scroll(win->x_win); - } + wmove(win->x_win, win->x_line, win->x_col); + wclrtoeol(win->x_win); + wmove(win->x_win, (win->x_line + 1) % win->x_nlines, win->x_col); + wclrtoeol(win->x_win); wmove(win->x_win, win->x_line, win->x_col); } diff --git a/usr.bin/talk/init_disp.c b/usr.bin/talk/init_disp.c index c4c1c4e71e9..c3f3f16f7ba 100644 --- a/usr.bin/talk/init_disp.c +++ b/usr.bin/talk/init_disp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init_disp.c,v 1.12 2002/06/20 06:13:56 form Exp $ */ +/* $OpenBSD: init_disp.c,v 1.13 2002/06/20 10:18:29 form Exp $ */ /* $NetBSD: init_disp.c,v 1.6 1994/12/09 02:14:17 jtc Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)init_disp.c 8.2 (Berkeley) 2/16/94"; #endif -static char rcsid[] = "$OpenBSD: init_disp.c,v 1.12 2002/06/20 06:13:56 form Exp $"; +static char rcsid[] = "$OpenBSD: init_disp.c,v 1.13 2002/06/20 10:18:29 form Exp $"; #endif /* not lint */ /* @@ -79,14 +79,14 @@ init_display() my_win.x_nlines = LINES / 2; my_win.x_ncols = COLS; my_win.x_win = newwin(my_win.x_nlines, my_win.x_ncols, 0, 0); - scrollok(my_win.x_win, TRUE); + scrollok(my_win.x_win, FALSE); wclear(my_win.x_win); his_win.x_nlines = LINES / 2 - 1; his_win.x_ncols = COLS; his_win.x_win = newwin(his_win.x_nlines, his_win.x_ncols, my_win.x_nlines+1, 0); - scrollok(his_win.x_win, TRUE); + scrollok(his_win.x_win, FALSE); wclear(his_win.x_win); line_win = newwin(1, COLS, my_win.x_nlines, 0); -- cgit v1.2.3