From 8f3c3c6cd044e3b5bf08dbfa3b3f04bb3f711bad Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 18 Oct 2022 17:05:54 +0100 Subject: patch 9.0.0789: dummy buffer ends up in a window Problem: Dummy buffer ends up in a window. Solution: Disallow navigating to a dummy buffer. --- src/buffer.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 0849b70997..5a4825feb2 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -1351,6 +1351,13 @@ do_buffer_ext( if ((flags & DOBUF_NOPOPUP) && bt_popup(buf) && !bt_terminal(buf)) return OK; #endif + if ((action == DOBUF_GOTO || action == DOBUF_SPLIT) + && (buf->b_flags & BF_DUMMY)) + { + // disallow navigating to the dummy buffer + semsg(_(e_buffer_nr_does_not_exist), count); + return FAIL; + } #ifdef FEAT_GUI need_mouse_correct = TRUE; -- cgit v1.2.3