diff --git a/src/gui.c b/src/gui.c
index 57c2b20..44deac7 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -5381,7 +5381,8 @@ gui_do_findrepl(flags, find_text, repl_text, down)
 	if (p != NULL)
 	    ga_concat(&ga, p);
 	vim_free(p);
-	ga_concat(&ga, (char_u *)"/g");
+	if (!p_gd)
+	    ga_concat(&ga, (char_u *)"/g");
     }
     ga_append(&ga, NUL);
 
