patch 9.1.1376: quickfix dummy buffer may remain as dummy buffer

Problem:  when failing to wipeout a quickfix dummy buffer, it will
          remain as a dummy buffer, despite being kept.
Solution: clear its dummy BF_DUMMY flag in this case (Sean Dewar).

closes: #17283

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/quickfix.c b/src/quickfix.c
index 9fe7978..9c5ad93 100644
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -7078,7 +7078,7 @@
 		    break;
 		}
 	if (!did_one)
-	    return;
+	    goto fail;
     }
 
     if (curbuf != buf && buf->b_nwindows == 0)	// safety check
@@ -7102,7 +7102,13 @@
 	if (dirname_start != NULL)
 	    // When autocommands/'autochdir' option changed directory: go back.
 	    restore_start_dir(dirname_start);
+
+	return;
     }
+
+fail:
+    // Keeping the buffer, remove the dummy flag.
+    buf->b_flags &= ~BF_DUMMY;
 }
 
 /*