0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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.
This commit is contained in:
Bram Moolenaar
2022-10-18 17:05:54 +01:00
parent 61c4b04799
commit 8f3c3c6cd0
3 changed files with 29 additions and 0 deletions

View File

@@ -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;