diff options
Diffstat (limited to 'src/nvim/search.c')
-rw-r--r-- | src/nvim/search.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/src/nvim/search.c b/src/nvim/search.c index c3e6fb816b..32bb0cb55a 100644 --- a/src/nvim/search.c +++ b/src/nvim/search.c @@ -144,9 +144,9 @@ int search_regcomp(char_u *pat, int pat_save, int pat_use, int options, regmmatc } if (spats[i].pat == NULL) { // pattern was never defined if (pat_use == RE_SUBST) { - EMSG(_(e_nopresub)); + emsg(_(e_nopresub)); } else { - EMSG(_(e_noprevre)); + emsg(_(e_noprevre)); } rc_did_emsg = true; return FAIL; @@ -577,7 +577,7 @@ int searchit(win_T *win, buf_T *buf, pos_T *pos, pos_T *end_pos, Direction dir, if (search_regcomp(pat, RE_SEARCH, pat_use, (options & (SEARCH_HIS + SEARCH_KEEP)), ®match) == FAIL) { if ((options & SEARCH_MSG) && !rc_did_emsg) { - EMSG2(_("E383: Invalid search string: %s"), mr_pattern); + semsg(_("E383: Invalid search string: %s"), mr_pattern); } return FAIL; } @@ -953,15 +953,15 @@ int searchit(win_T *win, buf_T *buf, pos_T *pos, pos_T *end_pos, Direction dir, if (!found) { // did not find it if (got_int) { - EMSG(_(e_interr)); + emsg(_(e_interr)); } else if ((options & SEARCH_MSG) == SEARCH_MSG) { if (p_ws) { - EMSG2(_(e_patnotf2), mr_pattern); + semsg(_(e_patnotf2), mr_pattern); } else if (lnum == 0) { - EMSG2(_("E384: search hit TOP without match for: %s"), + semsg(_("E384: search hit TOP without match for: %s"), mr_pattern); } else { - EMSG2(_("E385: search hit BOTTOM without match for: %s"), + semsg(_("E385: search hit BOTTOM without match for: %s"), mr_pattern); } } @@ -1115,7 +1115,7 @@ int do_search(oparg_T *oap, int dirc, int search_delim, char_u *pat, long count, if (spats[RE_SEARCH].pat == NULL) { // no previous pattern searchstr = spats[RE_SUBST].pat; if (searchstr == NULL) { - EMSG(_(e_noprevre)); + emsg(_(e_noprevre)); retval = 0; goto end_do_search; } @@ -1426,7 +1426,7 @@ int do_search(oparg_T *oap, int dirc, int search_delim, char_u *pat, long count, search_delim = dirc; if (dirc != '?' && dirc != '/') { retval = 0; - EMSG(_("E386: Expected '?' or '/' after ';'")); + emsg(_("E386: Expected '?' or '/' after ';'")); goto end_do_search; } ++pat; @@ -4655,7 +4655,7 @@ void f_searchcount(typval_T *argvars, typval_T *rettv, FunPtr fptr) bool error = false; if (argvars[0].v_type != VAR_DICT || argvars[0].vval.v_dict == NULL) { - EMSG(_(e_dictreq)); + emsg(_(e_dictreq)); return; } dict = argvars[0].vval.v_dict; @@ -4690,11 +4690,11 @@ void f_searchcount(typval_T *argvars, typval_T *rettv, FunPtr fptr) di = tv_dict_find(dict, (const char *)"pos", -1); if (di != NULL) { if (di->di_tv.v_type != VAR_LIST) { - EMSG2(_(e_invarg2), "pos"); + semsg(_(e_invarg2), "pos"); return; } if (tv_list_len(di->di_tv.vval.v_list) != 3) { - EMSG2(_(e_invarg2), "List format should be [lnum, col, off]"); + semsg(_(e_invarg2), "List format should be [lnum, col, off]"); return; } li = tv_list_find(di->di_tv.vval.v_list, 0L); @@ -4878,7 +4878,7 @@ void find_pattern_in_path(char_u *ptr, Direction dir, size_t len, bool whole, bo if (!got_int) { // don't display if 'q' typed at "--more--" // message msg_home_replace_hl(new_fname); - MSG_PUTS(_(" (includes previously listed match)")); + msg_puts(_(" (includes previously listed match)")); prev_fname = NULL; } } @@ -4895,25 +4895,25 @@ void find_pattern_in_path(char_u *ptr, Direction dir, size_t len, bool whole, bo msg_putchar('\n'); // cursor below last one } else { gotocmdline(true); // cursor at status line - MSG_PUTS_TITLE(_("--- Included files ")); + msg_puts_title(_("--- Included files ")); if (action != ACTION_SHOW_ALL) { - MSG_PUTS_TITLE(_("not found ")); + msg_puts_title(_("not found ")); } - MSG_PUTS_TITLE(_("in path ---\n")); + msg_puts_title(_("in path ---\n")); } did_show = true; while (depth_displayed < depth && !got_int) { ++depth_displayed; for (i = 0; i < depth_displayed; i++) { - MSG_PUTS(" "); + msg_puts(" "); } msg_home_replace(files[depth_displayed].name); - MSG_PUTS(" -->\n"); + msg_puts(" -->\n"); } if (!got_int) { // don't display if 'q' typed // for "--more--" message for (i = 0; i <= depth_displayed; i++) { - MSG_PUTS(" "); + msg_puts(" "); } if (new_fname != NULL) { // using "new_fname" is more reliable, e.g., when @@ -4962,9 +4962,9 @@ void find_pattern_in_path(char_u *ptr, Direction dir, size_t len, bool whole, bo if (new_fname == NULL && action == ACTION_SHOW_ALL) { if (already_searched) { - MSG_PUTS(_(" (Already listed)")); + msg_puts(_(" (Already listed)")); } else { - MSG_PUTS(_(" NOT FOUND")); + msg_puts(_(" NOT FOUND")); } } } @@ -5009,7 +5009,7 @@ void find_pattern_in_path(char_u *ptr, Direction dir, size_t len, bool whole, bo vim_snprintf((char *)IObuff, IOSIZE, _("Scanning included file: %s"), (char *)new_fname); - msg_trunc_attr(IObuff, true, HL_ATTR(HLF_R)); + msg_trunc_attr((char *)IObuff, true, HL_ATTR(HLF_R)); } else if (p_verbose >= 5) { verbose_enter(); smsg(_("Searching included file %s"), @@ -5214,7 +5214,7 @@ search_line: found = true; if (depth == -1 && lnum == curwin->w_cursor.lnum && l_g_do_tagpreview == 0) { - EMSG(_("E387: Match is on current line")); + emsg(_("E387: Match is on current line")); } else if (action == ACTION_SHOW) { show_pat_in_path(line, type, did_show, action, (depth == -1) ? NULL : files[depth].fp, @@ -5339,19 +5339,19 @@ exit_matched: if (type == CHECK_PATH) { if (!did_show) { if (action != ACTION_SHOW_ALL) { - MSG(_("All included files were found")); + msg(_("All included files were found")); } else { - MSG(_("No included files")); + msg(_("No included files")); } } } else if (!found && action != ACTION_EXPAND) { if (got_int || compl_interrupted) { - EMSG(_(e_interr)); + emsg(_(e_interr)); } else if (type == FIND_DEFINE) { - EMSG(_("E388: Couldn't find definition")); + emsg(_("E388: Couldn't find definition")); } else { - EMSG(_("E389: Couldn't find pattern")); + emsg(_("E389: Couldn't find pattern")); } } if (action == ACTION_SHOW || action == ACTION_SHOW_ALL) { |