diff options
-rw-r--r-- | src/ex_cmds.c | 9 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index c7135a3d7..d6bd0ebeb 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -415,8 +415,15 @@ ex_sort(eap) } *s = NUL; /* Use last search pattern if sort pattern is empty. */ - if (s == p + 1 && last_search_pat() != NULL) + if (s == p + 1) + { + if (last_search_pat() == NULL) + { + EMSG(_(e_noprevre)); + goto sortend; + } regmatch.regprog = vim_regcomp(last_search_pat(), RE_MAGIC); + } else regmatch.regprog = vim_regcomp(p + 1, RE_MAGIC); if (regmatch.regprog == NULL) diff --git a/src/version.c b/src/version.c index b4234e0a3..97fdd990c 100644 --- a/src/version.c +++ b/src/version.c @@ -729,6 +729,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 851, +/**/ 850, /**/ 849, |