diff options
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index bd114631bb..f38bdacb63 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -451,12 +451,9 @@ ex_sort(exarg_T *eap) } else if (!ASCII_ISALPHA(*p) && regmatch.regprog == NULL) { - s = skip_regexp(p + 1, *p, TRUE); - if (*s != *p) - { - emsg(_(e_invalpat)); + s = skip_regexp_err(p + 1, *p, TRUE); + if (s == NULL) goto sortend; - } *s = NUL; // Use last search pattern if sort pattern is empty. if (s == p + 1) |