Mercurial > vim
diff src/misc2.c @ 26917:d91aea2a612c v8.2.3987
patch 8.2.3987: error messages are spread out
Commit: https://github.com/vim/vim/commit/1d423ef75fc8bce2edfd2aab61cc9beaa63e31aa
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jan 2 21:26:16 2022 +0000
patch 8.2.3987: error messages are spread out
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 02 Jan 2022 22:30:04 +0100 |
parents | bce848ec8b1b |
children | 268f6a3511df |
line wrap: on
line diff
--- a/src/misc2.c +++ b/src/misc2.c @@ -2066,9 +2066,9 @@ parse_shape_opt(int what) commap = vim_strchr(modep, ','); if (colonp == NULL || (commap != NULL && commap < colonp)) - return N_("E545: Missing colon"); + return e_missing_colon_2; if (colonp == modep) - return N_("E546: Illegal mode"); + return e_illegal_mode; /* * Repeat for all mode's before the colon. @@ -2094,7 +2094,7 @@ parse_shape_opt(int what) break; if (idx == SHAPE_IDX_COUNT || (shape_table[idx].used_for & what) == 0) - return N_("E546: Illegal mode"); + return e_illegal_mode; if (len == 2 && modep[0] == 'v' && modep[1] == 'e') found_ve = TRUE; } @@ -2133,7 +2133,7 @@ parse_shape_opt(int what) if (mshape_names[i] == NULL) { if (!VIM_ISDIGIT(*p)) - return N_("E547: Illegal mouseshape"); + return e_illegal_mouseshape; if (round == 2) shape_table[idx].mshape = getdigits(&p) + MSHAPE_NUMBERED; @@ -2173,12 +2173,12 @@ parse_shape_opt(int what) { p += len; if (!VIM_ISDIGIT(*p)) - return N_("E548: digit expected"); + return e_digit_expected; n = getdigits(&p); if (len == 3) // "ver" or "hor" { if (n == 0) - return N_("E549: Illegal percentage"); + return e_illegal_percentage; if (round == 2) { if (TOLOWER_ASC(i) == 'v')