aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds.c
diff options
context:
space:
mode:
authorColin Kennedy <colinvfx@gmail.com>2023-12-25 20:41:09 -0800
committerzeertzjq <zeertzjq@outlook.com>2024-03-11 11:38:13 +0800
commit141182d6c6c06ad56413b81a518ba9b777a0cbe0 (patch)
tree451ef95315a55caf7ca95c9ef6eb8bedd48e77d9 /src/nvim/ex_cmds.c
parenta09ddd7ce55037edc9747a682810fba6a26bc201 (diff)
downloadrneovim-141182d6c6c06ad56413b81a518ba9b777a0cbe0.tar.gz
rneovim-141182d6c6c06ad56413b81a518ba9b777a0cbe0.tar.bz2
rneovim-141182d6c6c06ad56413b81a518ba9b777a0cbe0.zip
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 https://github.com/vim/vim/commit/215703563757a4464907ead6fb9edaeb7f430bea N/A patch: vim-patch:58f1e5c0893a
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r--src/nvim/ex_cmds.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c
index 74ad8e95a2..14bd2b87e3 100644
--- a/src/nvim/ex_cmds.c
+++ b/src/nvim/ex_cmds.c
@@ -2008,6 +2008,10 @@ static int check_readonly(int *forceit, buf_T *buf)
/// GETFILE_OPEN_OTHER for successfully opening another file.
int getfile(int fnum, char *ffname_arg, char *sfname_arg, bool setpm, linenr_T lnum, bool forceit)
{
+ if (!check_can_set_curbuf_forceit(forceit)) {
+ return GETFILE_ERROR;
+ }
+
char *ffname = ffname_arg;
char *sfname = sfname_arg;
bool other;