For some reason I find myself quite often in the situation that I want to C-x b to a different buffer but on entering the buffer name I decide against it and C-g abort it.
mg(1) then switches me to *scratch*. IMO that is the least useful thing mg(1) can do. This brings it in line with what emacs does and keeps the current buffer. OK? diff --git buffer.c buffer.c index ca1f30177f1..a789db6f0e3 100644 --- buffer.c +++ buffer.c @@ -89,6 +89,9 @@ usebuffer(int f, int n) bufp = eread("Switch to buffer: (default %s) ", bufn, NBUFN, EFNUL | EFNEW | EFBUF, curbp->b_altb->b_bname); + if (bufp == NULL) + return FALSE; + return (usebufname(bufp)); } -- I'm not entirely sure you are real.