diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2023-02-27 12:47:47 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-02-27 12:47:47 +0000 |
commit | 5da901bb68717b2baff6e971c1517219b6ee3a67 (patch) | |
tree | b19c5bcb38e3c5f523f37b787e8375d5402fc78f /src/map.c | |
parent | 30a844771554d28f1a88a256e6088dbb252228c1 (diff) |
patch 9.0.1359: too many "else if" statements in handling optionsv9.0.1359
Problem: Too many "else if" statements in handling options.
Solution: Add more functions for handling option changes. (Yegappan
Lakshmanan, closes #12060)
Diffstat (limited to 'src/map.c')
-rw-r--r-- | src/map.c | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -3088,11 +3088,10 @@ did_set_langmap(optset_T *args UNUSED) } if (to == NUL) { - // TODO: Need to use errbuf argument for this error message - // and return it. - semsg(_(e_langmap_matching_character_missing_for_str), - transchar(from)); - return NULL; + sprintf(args->os_errbuf, + _(e_langmap_matching_character_missing_for_str), + transchar(from)); + return args->os_errbuf; } if (from >= 256) @@ -3112,10 +3111,10 @@ did_set_langmap(optset_T *args UNUSED) { if (p[0] != ',') { - // TODO: Need to use errbuf argument for this error - // message and return it. - semsg(_(e_langmap_extra_characters_after_semicolon_str), p); - return NULL; + sprintf(args->os_errbuf, + _(e_langmap_extra_characters_after_semicolon_str), + p); + return args->os_errbuf; } ++p; } |