summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlum <lum@openbsd.org>2019-06-24 14:57:56 +0000
committerlum <lum@openbsd.org>2019-06-24 14:57:56 +0000
commit21ec0773e13a3433e7b4b01021dc1bb95ea3c381 (patch)
tree04ccd278a7a6fd16c55369df79601bc1ee793aff
parentadd an example hint that shows how original path can be retained (diff)
downloadwireguard-openbsd-21ec0773e13a3433e7b4b01021dc1bb95ea3c381.tar.xz
wireguard-openbsd-21ec0773e13a3433e7b4b01021dc1bb95ea3c381.zip
switch-to-buffer (C-x b) doesn't cancel properly if C-g is pressed.
It doesn't show 'Quit'. By returning ABORT, it behaves as expected when C-g is pressed (like all other functions that use the minibuffer).
-rw-r--r--usr.bin/mg/buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/mg/buffer.c b/usr.bin/mg/buffer.c
index 256ef563297..57ef738cfd1 100644
--- a/usr.bin/mg/buffer.c
+++ b/usr.bin/mg/buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: buffer.c,v 1.106 2019/06/22 15:38:15 lum Exp $ */
+
/* This file is in the public domain. */
@@ -112,7 +112,7 @@ usebuffer(int f, int n)
EFNUL | EFNEW | EFBUF, curbp->b_altb->b_bname);
if (bufp == NULL)
- return FALSE;
+ return (ABORT);
return (usebufname(bufp));
}