Fix recursion problem
diff --git a/editors/sed.c b/editors/sed.c
index 43395b3..b73d660 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -1014,6 +1014,8 @@
 						} else {
 							sed_cmd = branch_to(sed_cmd->label);
 						}
+						/* Reset the substitution flag */
+						substituted = 0;
 					}
 					break;
 				case 'y':{