diff options
Diffstat (limited to 'src/search.c')
-rw-r--r-- | src/search.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/search.c b/src/search.c index 9f1a80ad8..0c2a990ca 100644 --- a/src/search.c +++ b/src/search.c @@ -764,7 +764,7 @@ searchit( col = at_first_line && (options & SEARCH_COL) ? pos->col : (colnr_T)0; nmatched = vim_regexec_multi(®match, win, buf, - lnum, col, timed_out); + lnum, col, timed_out); // vim_regexec_multi() may clear "regprog" if (regmatch.regprog == NULL) break; @@ -1072,11 +1072,11 @@ searchit( * twice. */ if (!p_ws || stop_lnum != 0 || got_int - || called_emsg > called_emsg_before || *timed_out + || called_emsg > called_emsg_before || *timed_out #ifdef FEAT_SEARCH_EXTRA - || break_loop + || break_loop #endif - || found || loop) + || found || loop) break; /* @@ -4095,11 +4095,8 @@ f_searchcount(typval_T *argvars, typval_T *rettv) listitem_T *li; int error = FALSE; - if (argvars[0].v_type != VAR_DICT || argvars[0].vval.v_dict == NULL) - { - emsg(_(e_dictionary_required)); + if (check_for_nonnull_dict_arg(argvars, 0) == FAIL) return; - } dict = argvars[0].vval.v_dict; di = dict_find(dict, (char_u *)"timeout", -1); if (di != NULL) @@ -4815,11 +4812,8 @@ do_fuzzymatch(typval_T *argvars, typval_T *rettv, int retmatchpos) dict_T *d; dictitem_T *di; - if (argvars[2].v_type != VAR_DICT || argvars[2].vval.v_dict == NULL) - { - emsg(_(e_dictionary_required)); + if (check_for_nonnull_dict_arg(argvars, 2) == FAIL) return; - } // To search a dict, either a callback function or a key can be // specified. |