diff options
Diffstat (limited to 'editors/sed.c')
-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 523fb8dba..73034438a 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -441,8 +441,7 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr) | |||
441 | switch (substr[idx]) { | 441 | switch (substr[idx]) { |
442 | /* Replace all occurrences */ | 442 | /* Replace all occurrences */ |
443 | case 'g': | 443 | case 'g': |
444 | if (match[0] != '^') | 444 | sed_cmd->which_match = 0; |
445 | sed_cmd->which_match = 0; | ||
446 | break; | 445 | break; |
447 | /* Print pattern space */ | 446 | /* Print pattern space */ |
448 | case 'p': | 447 | case 'p': |