diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-05-05 07:14:39 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-05-05 09:20:30 +0800 |
commit | 88cfb49bee3c9102082c7010acb92244e4ad1348 (patch) | |
tree | 14c4ab0d2b319f83c42d940b00aebd42e8d971ac /src/nvim/mapping.c | |
parent | b8d5586d5b0d1e2d25533ee398d16bb2e8412820 (diff) | |
download | rneovim-88cfb49bee3c9102082c7010acb92244e4ad1348.tar.gz rneovim-88cfb49bee3c9102082c7010acb92244e4ad1348.tar.bz2 rneovim-88cfb49bee3c9102082c7010acb92244e4ad1348.zip |
vim-patch:8.2.4890: inconsistent capitalization in error messages
Problem: Inconsistent capitalization in error messages.
Solution: Make capitalization consistent. (Doug Kearns)
https://github.com/vim/vim/commit/cf030578b26460643dca4a40e7f2e3bc19c749aa
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/mapping.c')
-rw-r--r-- | src/nvim/mapping.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c index c1d02e89b8..c5449bd66e 100644 --- a/src/nvim/mapping.c +++ b/src/nvim/mapping.c @@ -65,6 +65,17 @@ static mapblock_T *(maphash[MAX_MAPHASH]) = { 0 }; # include "mapping.c.generated.h" #endif +static const char e_global_abbreviation_already_exists_for_str[] + = N_("E224: Global abbreviation already exists for %s"); +static const char e_global_mapping_already_exists_for_str[] + = N_("E225: Global mapping already exists for %s"); +static const char e_abbreviation_already_exists_for_str[] + = N_("E226: Abbreviation already exists for %s"); +static const char e_mapping_already_exists_for_str[] + = N_("E227: Mapping already exists for %s"); +static const char e_entries_missing_in_mapset_dict_argument[] + = N_("E460: Entries missing in mapset() dict argument"); + /// Get the start of the hashed map list for "state" and first character "c". mapblock_T *get_maphash_list(int state, int c) { @@ -645,10 +656,9 @@ static int buf_do_map(int maptype, MapArguments *args, int mode, bool is_abbrev, && mp->m_keylen == len && strncmp(mp->m_keys, lhs, (size_t)len) == 0) { if (is_abbrev) { - semsg(_("E224: global abbreviation already exists for %s"), - mp->m_keys); + semsg(_(e_global_abbreviation_already_exists_for_str), mp->m_keys); } else { - semsg(_("E225: global mapping already exists for %s"), mp->m_keys); + semsg(_(e_global_mapping_already_exists_for_str), mp->m_keys); } retval = 5; goto theend; @@ -761,9 +771,9 @@ static int buf_do_map(int maptype, MapArguments *args, int mode, bool is_abbrev, break; } else if (args->unique) { if (is_abbrev) { - semsg(_("E226: abbreviation already exists for %s"), p); + semsg(_(e_abbreviation_already_exists_for_str), p); } else { - semsg(_("E227: mapping already exists for %s"), p); + semsg(_(e_mapping_already_exists_for_str), p); } retval = 5; goto theend; @@ -2226,7 +2236,7 @@ void f_mapset(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) api_free_object(callback_obj); } if (lhs == NULL || lhsraw == NULL || orig_rhs == NULL) { - emsg(_("E460: entries missing in mapset() dict argument")); + emsg(_(e_entries_missing_in_mapset_dict_argument)); api_free_luaref(rhs_lua); return; } |