diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-10-18 17:05:54 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-18 17:05:54 +0100 |
commit | 8f3c3c6cd044e3b5bf08dbfa3b3f04bb3f711bad (patch) | |
tree | 66e5f78b1f4d346156a3fdc958c14fbd3b614f7b /src/buffer.c | |
parent | 61c4b04799bf114cadc3bbf212ae8b2ad22a6980 (diff) |
patch 9.0.0789: dummy buffer ends up in a windowv9.0.0789
Problem: Dummy buffer ends up in a window.
Solution: Disallow navigating to a dummy buffer.
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 7 |
1 files changed, 7 insertions, 0 deletions
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; |