From b5ced7380175d42c8e1a9db6c1edf20d64f50e08 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sun, 18 Nov 2007 15:19:45 +0100 Subject: [PATCH] vi/vs_split: vs_swap: initialize wp of new window before calling vs_sm_fill vs_sm_fill will read lines from the files, which requires the conversion buffer in wp if widechars are enabled. --- vi/vs_split.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vi/vs_split.c b/vi/vs_split.c index d53f0c13..155e7044 100644 --- a/vi/vs_split.c +++ b/vi/vs_split.c @@ -773,6 +773,7 @@ vs_swap(SCR *sp, SCR **nspp, char *name) _TMAP(nsp) = _HMAP(nsp) + (nsp->t_rows - 1); /* Fill the map. */ + nsp->wp = sp->wp; if (vs_sm_fill(nsp, nsp->lno, P_FILL)) return (1); @@ -784,7 +785,6 @@ vs_swap(SCR *sp, SCR **nspp, char *name) */ CIRCLEQ_REMOVE(&gp->hq, nsp, q); CIRCLEQ_INSERT_AFTER(&wp->scrq, sp, nsp, q); - nsp->wp = sp->wp; /* * Don't change the screen's cursor information other than to -- 2.11.4.GIT