diff src/ex_cmds.c @ 34470:dd8f5311cee5 v9.1.0147

patch 9.1.0147: Cannot keep a buffer focused in a window Commit: https://github.com/vim/vim/commit/215703563757a4464907ead6fb9edaeb7f430bea Author: Colin Kennedy <colinvfx@gmail.com> Date: Sun Mar 3 16:16:47 2024 +0100 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: #6445 closes: #13903 Signed-off-by: Colin Kennedy <colinvfx@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 03 Mar 2024 16:30:06 +0100
parents d7cfd8fb1d75
children 9e093c96dff6
line wrap: on
line diff
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -2428,6 +2428,9 @@ getfile(
     int		retval;
     char_u	*free_me = NULL;
 
+    if (!check_can_set_curbuf_forceit(forceit))
+	return GETFILE_ERROR;
+
     if (text_locked())
 	return GETFILE_ERROR;
     if (curbuf_locked())