diff options
author | Brad King <brad.king@kitware.com> | 2020-06-03 15:25:36 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-23 09:20:17 -0400 |
commit | ee3605aed450f6ee7fe8fd62ed372e1aa3919c4c (patch) | |
tree | acb3c6a206a6a44e08ef1a7de15db6bb84cd4924 /src/nvim/syntax.c | |
parent | ae5651942edf748d0d8147caa7eabe5175f0bfe9 (diff) | |
download | rneovim-ee3605aed450f6ee7fe8fd62ed372e1aa3919c4c.tar.gz rneovim-ee3605aed450f6ee7fe8fd62ed372e1aa3919c4c.tar.bz2 rneovim-ee3605aed450f6ee7fe8fd62ed372e1aa3919c4c.zip |
syntax: Factor out duplicate E390 strings
Diffstat (limited to 'src/nvim/syntax.c')
-rw-r--r-- | src/nvim/syntax.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 8999fc4b17..41b8ebe4a2 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -121,6 +121,8 @@ static int hl_attr_table[] = { HL_BOLD, HL_STANDOUT, HL_UNDERLINE, HL_UNDERCURL, HL_ITALIC, HL_INVERSE, HL_INVERSE, HL_STRIKETHROUGH, HL_NOCOMBINE, 0 }; +static char e_illegal_arg[] = N_("E390: Illegal argument: %s"); + // The patterns that are being searched for are stored in a syn_pattern. // A match item consists of one pattern. // A start/end item consists of n start patterns and m end patterns. @@ -3045,7 +3047,7 @@ static void syn_cmd_conceal(exarg_T *eap, int syncing) } else if (STRNICMP(arg, "off", 3) == 0 && next - arg == 3) { curwin->w_s->b_syn_conceal = false; } else { - EMSG2(_("E390: Illegal argument: %s"), arg); + EMSG2(_(e_illegal_arg), arg); } } @@ -3073,7 +3075,7 @@ static void syn_cmd_case(exarg_T *eap, int syncing) } else if (STRNICMP(arg, "ignore", 6) == 0 && next - arg == 6) { curwin->w_s->b_syn_ic = true; } else { - EMSG2(_("E390: Illegal argument: %s"), arg); + EMSG2(_(e_illegal_arg), arg); } } @@ -3105,7 +3107,7 @@ static void syn_cmd_spell(exarg_T *eap, int syncing) } else if (STRNICMP(arg, "default", 7) == 0 && next - arg == 7) { curwin->w_s->b_syn_spell = SYNSPL_DEFAULT; } else { - EMSG2(_("E390: Illegal argument: %s"), arg); + EMSG2(_(e_illegal_arg), arg); return; } |