svn commit: trunk/busybox/editors

pgf at busybox.net pgf at busybox.net
Wed Mar 5 16:44:03 UTC 2008


Author: pgf
Date: 2008-03-05 08:44:02 -0800 (Wed, 05 Mar 2008)
New Revision: 21171

Log:
fix vi's '?' and '/' commands to correctly set a new direction
when reusing a previous search pattern.  previously only 'n' and 'N'
reversed directions properly.


Modified:
   trunk/busybox/editors/vi.c


Changeset:
Modified: trunk/busybox/editors/vi.c
===================================================================
--- trunk/busybox/editors/vi.c	2008-03-05 16:20:24 UTC (rev 21170)
+++ trunk/busybox/editors/vi.c	2008-03-05 16:44:02 UTC (rev 21171)
@@ -3293,8 +3293,11 @@
 		buf[0] = c;
 		buf[1] = '\0';
 		q = get_input_line(buf);	// get input line- use "status line"
-		if (q[0] && !q[1])
+		if (q[0] && !q[1]) {
+			if (last_search_pattern[0])
+			    last_search_pattern[0] = c;
 			goto dc3; // if no pat re-use old pat
+		}
 		if (q[0]) {       // strlen(q) > 1: new pat- save it and find
 			// there is a new pat
 			free(last_search_pattern);




More information about the busybox-cvs mailing list