diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-10-19 08:16:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-19 08:16:53 +0800 |
commit | bcd25b2009f1e503e13c9fbdf9de9fa9aac0dca2 (patch) | |
tree | 8fd6e1b16af34a1ccbf9bab4d644b3a6f6fe4b37 /src/nvim/buffer.c | |
parent | 22473672aa1ce005d3841d0838a21cd6c6b721f7 (diff) | |
parent | 88eeb4d941a4ae3f75bbf4faae2882786e44f687 (diff) | |
download | rneovim-bcd25b2009f1e503e13c9fbdf9de9fa9aac0dca2.tar.gz rneovim-bcd25b2009f1e503e13c9fbdf9de9fa9aac0dca2.tar.bz2 rneovim-bcd25b2009f1e503e13c9fbdf9de9fa9aac0dca2.zip |
Merge pull request #20727 from zeertzjq/vim-9.0.0789
vim-patch:9.0.{0789,0790}
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 84ff2fa59b..8016904702 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -1224,6 +1224,11 @@ int do_buffer(int action, int start, int dir, int count, int forceit) } return FAIL; } + if ((action == DOBUF_GOTO || action == DOBUF_SPLIT) && (buf->b_flags & BF_DUMMY)) { + // disallow navigating to the dummy buffer + semsg(_(e_nobufnr), count); + return FAIL; + } // delete buffer "buf" from memory and/or the list if (unload) { |