mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 22:18:33 +00:00
vim-patch:9.1.0147: Cannot keep a buffer focused in a window
Problem: Cannot keep a buffer focused in a window
(Amit Levy)
Solution: Add the 'winfixbuf' window-local option
(Colin Kennedy)
fixes: vim/vim#6445
closes: vim/vim#13903
2157035637
N/A patch:
vim-patch:58f1e5c0893a
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user