diff --git a/src/cmdexpand.c b/src/cmdexpand.c index 3c660b5ea2..f313981984 100644 --- a/src/cmdexpand.c +++ b/src/cmdexpand.c @@ -4183,7 +4183,7 @@ expand_process_user_list( { if (tv->vval.v_string == NULL) continue; // Skip NULL strings - p = vim_strsave(li->li_tv.vval.v_string); + p = vim_strsave(tv->vval.v_string); } else if (tv->v_type == VAR_DICT && tv->vval.v_dict != NULL) { diff --git a/src/option.c b/src/option.c index 426e58e29b..4197d4d8b7 100644 --- a/src/option.c +++ b/src/option.c @@ -4527,44 +4527,6 @@ did_set_maxsearchcount(optset_T *args UNUSED) #undef MAX_SEARCH_COUNT } -/* - * Validate 'shellpipe'/'shellredir' option. - */ - char * -did_set_shellpipe_redir(optset_T *args) -{ - char_u *p; - bool seen = false; - - for (p = args->os_newval.string; *p != NUL; ++p) - { - if (*p != '%') - continue; - - if (p[1] == NUL) - return e_invalid_format_string_single_percent_s; - - if (p[1] == '%') - { - ++p; // skip second % - continue; - } - - if (p[1] == 's') - { - if (seen) - return e_invalid_format_string_single_percent_s; - - seen = true; - ++p; // consume 's' - continue; - } - return e_invalid_format_string_single_percent_s; - } - return NULL; -} - - #if defined(BACKSLASH_IN_FILENAME) /* * Process the updated 'shellslash' option value. diff --git a/src/optionstr.c b/src/optionstr.c index 59d4909130..b60e595868 100644 --- a/src/optionstr.c +++ b/src/optionstr.c @@ -4179,6 +4179,43 @@ expand_set_sessionoptions( } #endif +/* + * Validate 'shellpipe'/'shellredir' option. + */ + char * +did_set_shellpipe_redir(optset_T *args) +{ + char_u *p; + bool seen = false; + + for (p = args->os_newval.string; *p != NUL; ++p) + { + if (*p != '%') + continue; + + if (p[1] == NUL) + return e_invalid_format_string_single_percent_s; + + if (p[1] == '%') + { + ++p; // skip second % + continue; + } + + if (p[1] == 's') + { + if (seen) + return e_invalid_format_string_single_percent_s; + + seen = true; + ++p; // consume 's' + continue; + } + return e_invalid_format_string_single_percent_s; + } + return NULL; +} + /* * The 'shortmess' option is changed. */ diff --git a/src/proto/option.pro b/src/proto/option.pro index ad8c9043ab..ae586ea978 100644 --- a/src/proto/option.pro +++ b/src/proto/option.pro @@ -65,7 +65,6 @@ char *did_set_pyxversion(optset_T *args); char *did_set_readonly(optset_T *args); char *did_set_scrollbind(optset_T *args); char *did_set_maxsearchcount(optset_T *args); -char *did_set_shellpipe_redir(optset_T *args); char *did_set_shellslash(optset_T *args); char *did_set_shiftwidth_tabstop(optset_T *args); char *did_set_showtabline(optset_T *args); diff --git a/src/proto/optionstr.pro b/src/proto/optionstr.pro index cb174e73c0..c8a8b12ff5 100644 --- a/src/proto/optionstr.pro +++ b/src/proto/optionstr.pro @@ -152,6 +152,7 @@ char *did_set_selectmode(optset_T *args); int expand_set_selectmode(optexpand_T *args, int *numMatches, char_u ***matches); char *did_set_sessionoptions(optset_T *args); int expand_set_sessionoptions(optexpand_T *args, int *numMatches, char_u ***matches); +char *did_set_shellpipe_redir(optset_T *args); char *did_set_shortmess(optset_T *args); int expand_set_shortmess(optexpand_T *args, int *numMatches, char_u ***matches); char *did_set_showbreak(optset_T *args); diff --git a/src/version.c b/src/version.c index 5ffa63f7fe..6ac372ac5d 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 */ +/**/ + 460, /**/ 459, /**/