comparison src/ex_docmd.c @ 26877:06a137af96f8 v8.2.3967

patch 8.2.3967: error messages are spread out Commit: https://github.com/vim/vim/commit/460ae5dfca31fa627531c263184849976755cf6b Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 1 14:19:49 2022 +0000 patch 8.2.3967: error messages are spread out Problem: Error messages are spread out. Solution: Move more errors to errors.h.
author Bram Moolenaar <Bram@vim.org>
date Sat, 01 Jan 2022 15:30:05 +0100
parents bce848ec8b1b
children 7f150a4936f2
comparison
equal deleted inserted replaced
26876:601a973ac16c 26877:06a137af96f8
2122 && curbuf_locked()) 2122 && curbuf_locked())
2123 goto doend; 2123 goto doend;
2124 2124
2125 if (!ni && !(ea.argt & EX_RANGE) && ea.addr_count > 0) 2125 if (!ni && !(ea.argt & EX_RANGE) && ea.addr_count > 0)
2126 { 2126 {
2127 // no range allowed 2127 errormsg = _(e_no_range_allowed);
2128 errormsg = _(e_norange);
2129 goto doend; 2128 goto doend;
2130 } 2129 }
2131 } 2130 }
2132 2131
2133 if (!ni && !(ea.argt & EX_BANG) && ea.forceit) // no <!> allowed 2132 if (!ni && !(ea.argt & EX_BANG) && ea.forceit)
2134 { 2133 {
2135 errormsg = _(e_nobang); 2134 errormsg = _(e_no_bang_allowed);
2136 goto doend; 2135 goto doend;
2137 } 2136 }
2138 2137
2139 /* 2138 /*
2140 * Don't complain about the range if it is not used 2139 * Don't complain about the range if it is not used
4014 4013
4015 static void 4014 static void
4016 addr_error(cmd_addr_T addr_type) 4015 addr_error(cmd_addr_T addr_type)
4017 { 4016 {
4018 if (addr_type == ADDR_NONE) 4017 if (addr_type == ADDR_NONE)
4019 emsg(_(e_norange)); 4018 emsg(_(e_no_range_allowed));
4020 else 4019 else
4021 emsg(_(e_invalid_range)); 4020 emsg(_(e_invalid_range));
4022 } 4021 }
4023 4022
4024 /* 4023 /*
6880 6879
6881 regmatch.rm_ic = p_ic; 6880 regmatch.rm_ic = p_ic;
6882 if (vim_regexec(&regmatch, line, (colnr_T)0)) 6881 if (vim_regexec(&regmatch, line, (colnr_T)0))
6883 curwin->w_cursor.col = (colnr_T)(regmatch.startp[0] - line); 6882 curwin->w_cursor.col = (colnr_T)(regmatch.startp[0] - line);
6884 else 6883 else
6885 emsg(_(e_nomatch)); 6884 emsg(_(e_no_match));
6886 vim_regfree(regmatch.regprog); 6885 vim_regfree(regmatch.regprog);
6887 vim_free(line); 6886 vim_free(line);
6888 } 6887 }
6889 // Move to the NUL, ignore any other arguments. 6888 // Move to the NUL, ignore any other arguments.
6890 eap->arg += STRLEN(eap->arg); 6889 eap->arg += STRLEN(eap->arg);
7252 if (i != OK) 7251 if (i != OK)
7253 { 7252 {
7254 #if defined(FEAT_EVAL) 7253 #if defined(FEAT_EVAL)
7255 if (!aborting()) 7254 if (!aborting())
7256 #endif 7255 #endif
7257 semsg(_(e_notopen), eap->arg); 7256 semsg(_(e_cant_open_file_str), eap->arg);
7258 } 7257 }
7259 else 7258 else
7260 { 7259 {
7261 if (empty && exmode_active) 7260 if (empty && exmode_active)
7262 { 7261 {