=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mg/echo.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- src/usr.bin/mg/echo.c 2009/06/03 20:58:20 1.48 +++ src/usr.bin/mg/echo.c 2009/06/04 23:39:37 1.49 @@ -1,4 +1,4 @@ -/* $OpenBSD: echo.c,v 1.48 2009/06/03 20:58:20 kjell Exp $ */ +/* $OpenBSD: echo.c,v 1.49 2009/06/04 23:39:37 kjell Exp $ */ /* This file is in the public domain. */ @@ -472,9 +472,13 @@ if (cwin == TRUE) { /* blow away cpltion window */ bp = bfind("*Completions*", TRUE); - if ((wp = popbuf(bp)) != NULL) { - curwp = wp; - delwind(FFRAND, 1); + if ((wp = popbuf(bp, WEPHEM)) != NULL) { + if (wp->w_flag & WEPHEM) { + curwp = wp; + delwind(FFRAND, 1); + } else { + killbuffer(bp); + } } } return (ret); @@ -729,7 +733,7 @@ * the buffer list, obviously we don't want it freed. */ free_file_list(wholelist); - popbuftop(bp); /* split the screen and put up the help + popbuftop(bp, WEPHEM); /* split the screen and put up the help * buffer */ update(); /* needed to make the new stuff actually * appear */