summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlum <lum@openbsd.org>2021-03-18 18:09:21 +0000
committerlum <lum@openbsd.org>2021-03-18 18:09:21 +0000
commit3e94becbc8e71eac7acbb30344bdec3911f87234 (patch)
tree22b2a879c8d4256f32ddef2d984e392cc33f8df6
parentDo not include ':' in the port number. (diff)
downloadwireguard-openbsd-3e94becbc8e71eac7acbb30344bdec3911f87234.tar.xz
wireguard-openbsd-3e94becbc8e71eac7acbb30344bdec3911f87234.zip
From Joachim Wiberg's version of mg.
"This patch makes sure to clear the status/echo line after killing and switching buffers by name. Otherwise the kill/switch prompt lingers"
-rw-r--r--usr.bin/mg/buffer.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/usr.bin/mg/buffer.c b/usr.bin/mg/buffer.c
index 42ab09a25bd..5dd4381d3d9 100644
--- a/usr.bin/mg/buffer.c
+++ b/usr.bin/mg/buffer.c
@@ -1,4 +1,4 @@
-
+/* $OpenBSD: buffer.c,v 1.110 2021/03/18 18:09:21 lum Exp $ */
/* This file is in the public domain. */
@@ -78,6 +78,7 @@ int
usebufname(const char *bufp)
{
struct buffer *bp = NULL;
+ int ret;
if (bufp == NULL) {
if ((bp = bfind("*scratch*", TRUE)) == NULL)
@@ -89,7 +90,10 @@ usebufname(const char *bufp)
/* and put it in current window */
curbp = bp;
- return (showbuffer(bp, curwp, WFFRAME | WFFULL));
+ ret = showbuffer(bp, curwp, WFFRAME | WFFULL);
+ eerase();
+
+ return (ret);
}
/*
@@ -165,6 +169,7 @@ killbuffer_cmd(int f, int n)
{
struct buffer *bp;
char bufn[NBUFN], *bufp;
+ int ret;
if (f & FFRAND) /* dired mode 'q' */
bp = curbp;
@@ -175,7 +180,10 @@ killbuffer_cmd(int f, int n)
bp = curbp;
else if ((bp = bfind(bufn, FALSE)) == NULL)
return (FALSE);
- return (killbuffer(bp));
+ ret = killbuffer(bp);
+ eerase();
+
+ return (ret);
}
int