patch 8.0.0568: 1gd may hang

Problem:    "1gd" may hang.
Solution:   Don't get stuck in one position. (Christian Brabandt, closes #1643)
diff --git a/src/normal.c b/src/normal.c
index 53bda6c..25c0986 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -4371,7 +4371,12 @@
 	    if ((pos = findmatchlimit(NULL, '}', FM_FORWARD,
 		     (int)(old_pos.lnum - curwin->w_cursor.lnum + 1))) != NULL
 		    && pos->lnum < old_pos.lnum)
+	    {
+		/* There can't be a useful match before the end of this block.
+		 * Skip to the end. */
+		curwin->w_cursor = *pos;
 		continue;
+	    }
 	}
 
 	if (t == FAIL)
@@ -8311,6 +8316,7 @@
 	break;
 #endif
 
+    /* "g<": show scrollback text */
     case '<':
 	show_sb_text();
 	break;