summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1994-09-12 11:41:29 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1994-09-12 11:41:29 +0000
commit8c37ae4d2cc252a1b3b699ea9d664ed8145dfba6 (patch)
tree2b76cba59bf00e9dbc109c09d90459df312e6f88
parentcde7257454e2cf53a8cf1610f3eb2a4131bef61f (diff)
Notes
-rw-r--r--lib/libcurses/newwin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcurses/newwin.c b/lib/libcurses/newwin.c
index 79e5f2a25272..afc90cf0aecb 100644
--- a/lib/libcurses/newwin.c
+++ b/lib/libcurses/newwin.c
@@ -134,8 +134,8 @@ __set_subwin(orig, win)
/* Point line pointers to line space. */
for (lp = win->lspace, i = 0; i < win->maxy; i++, lp++) {
win->lines[i] = lp;
- olp = orig->lines[i + win->begy];
- lp->line = &olp->line[win->begx];
+ olp = orig->lines[i + win->begy - orig->begy];
+ lp->line = &olp->line[win->ch_off];
lp->firstchp = &olp->firstch;
lp->lastchp = &olp->lastch;
lp->hash = __hash((char *) lp->line, win->maxx * __LDATASIZE);