diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-05-05 09:50:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-05 09:50:36 +0800 |
commit | 9ded4c127599b821d0875db9d63049b5970437a4 (patch) | |
tree | 04ab960fec3aaaf6d139164e27ee8c4c6ff8f900 /src/nvim/syntax.c | |
parent | d79e72621226cae91c8d8f6ad23e3c0670e1211c (diff) | |
parent | bdaaf2e8e113f8c32c70f83b60e0bf3f648357c1 (diff) | |
download | rneovim-9ded4c127599b821d0875db9d63049b5970437a4.tar.gz rneovim-9ded4c127599b821d0875db9d63049b5970437a4.tar.bz2 rneovim-9ded4c127599b821d0875db9d63049b5970437a4.zip |
Merge pull request #23483 from zeertzjq/vim-8.2.3135
vim-patch:8.2.{3135,4890,4892},9.0.0250: error message improvements
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r-- | src/nvim/syntax.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 840cd60f13..d237972e40 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -59,6 +59,12 @@ static bool did_syntax_onoff = false; #define SPO_COUNT 7 static const char e_illegal_arg[] = N_("E390: Illegal argument: %s"); +static const char e_contains_argument_not_accepted_here[] + = N_("E395: Contains argument not accepted here"); +static const char e_invalid_cchar_value[] + = N_("E844: Invalid cchar value"); +static const char e_trailing_char_after_rsb_str_str[] + = N_("E890: Trailing char after ']': %s]%s"); // The patterns that are being searched for are stored in a syn_pattern. // A match item consists of one pattern. @@ -3874,7 +3880,7 @@ static char *get_syn_options(char *arg, syn_opt_arg_T *opt, int *conceal_char, i if (flagtab[fidx].argtype == 1) { if (!opt->has_cont_list) { - emsg(_("E395: contains argument not accepted here")); + emsg(_(e_contains_argument_not_accepted_here)); return NULL; } if (get_id_list(&arg, 8, &opt->cont_list, skip) == FAIL) { @@ -3893,7 +3899,7 @@ static char *get_syn_options(char *arg, syn_opt_arg_T *opt, int *conceal_char, i *conceal_char = utf_ptr2char(arg + 6); arg += utfc_ptr2len(arg + 6) - 1; if (!vim_isprintc_strict(*conceal_char)) { - emsg(_("E844: invalid cchar value")); + emsg(_(e_invalid_cchar_value)); return NULL; } arg = skipwhite(arg + 7); @@ -4111,8 +4117,7 @@ static void syn_cmd_keyword(exarg_T *eap, int syncing) } if (p[1] == ']') { if (p[2] != NUL) { - semsg(_("E890: trailing char after ']': %s]%s"), - kw, &p[2]); + semsg(_(e_trailing_char_after_rsb_str_str), kw, &p[2]); goto error; } kw = p + 1; |