diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-03-11 12:05:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-11 12:05:01 +0800 |
commit | 3814750d3789b5c5690e8fa68066bd864a4f0a8e (patch) | |
tree | 8958b54539e3b4df3b8e6eebf6f11c7fbecc1662 /src/nvim/buffer.c | |
parent | a09ddd7ce55037edc9747a682810fba6a26bc201 (diff) | |
parent | 3b3511c4d9f1855d4240da0d844ce7875176c607 (diff) | |
download | rneovim-3814750d3789b5c5690e8fa68066bd864a4f0a8e.tar.gz rneovim-3814750d3789b5c5690e8fa68066bd864a4f0a8e.tar.bz2 rneovim-3814750d3789b5c5690e8fa68066bd864a4f0a8e.zip |
Merge pull request #27738 from ColinKennedy/vim-9.1.0147
vim-patch:9.1.{0147,0149,0150,0152,0156},58f1e5c0893a: 'winfixbuf'
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r-- | src/nvim/buffer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 7154be36be..e141706edd 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -1305,6 +1305,12 @@ int do_buffer(int action, int start, int dir, int count, int forceit) } return FAIL; } + + if (action == DOBUF_GOTO && buf != curbuf && !check_can_set_curbuf_forceit(forceit)) { + // disallow navigating to another buffer when 'winfixbuf' is applied + return FAIL; + } + if ((action == DOBUF_GOTO || action == DOBUF_SPLIT) && (buf->b_flags & BF_DUMMY)) { // disallow navigating to the dummy buffer semsg(_(e_nobufnr), count); |