patch 8.0.1304: CTRL-G/CTRL-T don't work with incsearch and empty pattern

Problem:    CTRL-G/CTRL-T don't work with incsearch and empty pattern.
Solution:   Use the last search pattern. (Christian Brabandt, closes #2292)
diff --git a/src/search.c b/src/search.c
index fc689db..8bb5f3d 100644
--- a/src/search.c
+++ b/src/search.c
@@ -393,6 +393,12 @@
     last_idx = saved_last_idx;
     SET_NO_HLSEARCH(saved_no_hlsearch);
 }
+
+    char_u *
+last_search_pattern(void)
+{
+    return spats[RE_SEARCH].pat;
+}
 #endif
 
 /*