diff options
author | Kjell Wooding <kjell@cvs.openbsd.org> | 2005-06-03 08:23:13 +0000 |
---|---|---|
committer | Kjell Wooding <kjell@cvs.openbsd.org> | 2005-06-03 08:23:13 +0000 |
commit | 87136695717c490b68715ca08ec7ce0a34178515 (patch) | |
tree | de754cea35bb9dc379187c9924f6b71058b602e0 /usr.bin/mg/buffer.c | |
parent | b6bf07802830f1d01d7e66586c6ef32bafea8f8e (diff) |
Clean up find-alternate-file (C-x C-v) so abort returns to original
file, like its emacs ancestor.
ok cloder@
Diffstat (limited to 'usr.bin/mg/buffer.c')
-rw-r--r-- | usr.bin/mg/buffer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/mg/buffer.c b/usr.bin/mg/buffer.c index bb310e43da0..b5e4351b924 100644 --- a/usr.bin/mg/buffer.c +++ b/usr.bin/mg/buffer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: buffer.c,v 1.40 2005/05/31 20:38:59 kjell Exp $ */ +/* $OpenBSD: buffer.c,v 1.41 2005/06/03 08:23:12 kjell Exp $ */ /* * Buffer handling. @@ -123,6 +123,7 @@ killbuffer(BUFFER *bp) BUFFER *bp1; BUFFER *bp2; MGWIN *wp; + int s; /* * Find some other buffer to display. Try the alternate buffer, @@ -141,8 +142,8 @@ killbuffer(BUFFER *bp) return (FALSE); } } - if (bclear(bp) != TRUE) - return (TRUE); + if ((s = bclear(bp)) != TRUE) + return (s); for (wp = wheadp; bp->b_nwnd > 0; wp = wp->w_wndp) { if (wp->w_bufp == bp) { bp2 = bp1->b_altb; /* save alternate buffer */ |