diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/sed.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/editors/sed.c b/editors/sed.c index a6845a979..e8c82ac63 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -435,8 +435,7 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr) | |||
435 | switch (substr[idx]) { | 435 | switch (substr[idx]) { |
436 | /* Replace all occurrences */ | 436 | /* Replace all occurrences */ |
437 | case 'g': | 437 | case 'g': |
438 | if (match[0] != '^') | 438 | sed_cmd->which_match = 0; |
439 | sed_cmd->which_match = 0; | ||
440 | break; | 439 | break; |
441 | /* Print pattern space */ | 440 | /* Print pattern space */ |
442 | case 'p': | 441 | case 'p': |