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>
diff --git a/src/window.c b/src/window.c
index bda24fc..435bdc9 100644
--- a/src/window.c
+++ b/src/window.c
@@ -159,6 +159,37 @@
 #endif
 
 /*
+ * Check if the current window is allowed to move to a different buffer.
+ * If the window has 'winfixbuf', this function will return FALSE.
+ */
+    int
+check_can_set_curbuf_disabled(void)
+{
+    if (curwin->w_p_wfb)
+    {
+	semsg("%s", e_winfixbuf_cannot_go_to_buffer);
+	return FALSE;
+    }
+    return TRUE;
+}
+
+/*
+ * Check if the current window is allowed to move to a different buffer.
+ * If the window has 'winfixbuf', then forceit must be TRUE or this function
+ * will return FALSE.
+ */
+    int
+check_can_set_curbuf_forceit(int forceit)
+{
+    if (!forceit && curwin->w_p_wfb)
+    {
+	semsg("%s", e_winfixbuf_cannot_go_to_buffer);
+	return FALSE;
+    }
+    return TRUE;
+}
+
+/*
  * Return the current window, unless in the cmdline window and "prevwin" is
  * set, then return "prevwin".
  */
@@ -667,7 +698,7 @@
 
 		find_pattern_in_path(ptr, 0, len, TRUE,
 			Prenum == 0 ? TRUE : FALSE, type,
-			Prenum1, ACTION_SPLIT, (linenr_T)1, (linenr_T)MAXLNUM);
+			Prenum1, ACTION_SPLIT, (linenr_T)1, (linenr_T)MAXLNUM, FALSE);
 		vim_free(ptr);
 		curwin->w_set_curswant = TRUE;
 		break;