updated for version 7.3.610
Problem:    Cannot operate on the text that a search pattern matches.
Solution:   Add the "gn" and "gN" commands. (Christian Brabandt)
diff --git a/src/normal.c b/src/normal.c
index 66654f8..0791b1a 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -1780,10 +1780,18 @@
 	    {
 		/* Prepare for redoing.  Only use the nchar field for "r",
 		 * otherwise it might be the second char of the operator. */
-		prep_redo(oap->regname, 0L, NUL, 'v',
-				get_op_char(oap->op_type),
-				get_extra_op_char(oap->op_type),
-				oap->op_type == OP_REPLACE ? cap->nchar : NUL);
+		if (cap->cmdchar == 'g' && (cap->nchar == 'n'
+							|| cap->nchar == 'N'))
+		    /* "gn" and "gN" are a bit different */
+		    prep_redo(oap->regname, 0L, NUL, cap->cmdchar, cap->nchar,
+					get_op_char(oap->op_type),
+					get_extra_op_char(oap->op_type));
+		else
+		    prep_redo(oap->regname, 0L, NUL, 'v',
+					get_op_char(oap->op_type),
+					get_extra_op_char(oap->op_type),
+					oap->op_type == OP_REPLACE
+							  ? cap->nchar : NUL);
 		if (!redo_VIsual_busy)
 		{
 		    redo_VIsual_mode = resel_VIsual_mode;
@@ -7987,6 +7995,17 @@
 	cap->arg = TRUE;
 	nv_visual(cap);
 	break;
+
+    /* "gn", "gN" visually select next/previous search match
+     * "gn" selects next match
+     * "gN" selects previous match
+     */
+    case 'N':
+    case 'n':
+	if (!current_search(cap->count1, cap->nchar == 'n'))
+	    beep_flush();
+
+	break;
 #endif /* FEAT_VISUAL */
 
     /*