diff options
author | Michael Schupikov <michael@schupikov.de> | 2017-09-23 09:56:44 +0200 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-12-15 15:50:58 -0500 |
commit | d5bce42b524708a54243658e87b1e3bd9c7acdf3 (patch) | |
tree | 2707be6b36b8b5a920bfd73f1b60da011b7e1ced /src/nvim/option.c | |
parent | 6ff13d78b7eb0a1fae2e2e8cdd054072e1467158 (diff) | |
download | rneovim-d5bce42b524708a54243658e87b1e3bd9c7acdf3.tar.gz rneovim-d5bce42b524708a54243658e87b1e3bd9c7acdf3.tar.bz2 rneovim-d5bce42b524708a54243658e87b1e3bd9c7acdf3.zip |
vim-patch:8.0.0074
Problem: Cannot make Vim fail on an internal error.
Solution: Add IEMSG() and IEMSG2(). (Domenique Pelle) Avoid reporting an
internal error without mentioning where.
https://github.com/vim/vim/commit/95f096030ed1a8afea028f2ea295d6f6a70f466f
Signed-off-by: Michael Schupikov <michael@schupikov.de>
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 499cf79836..a345906200 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2258,7 +2258,7 @@ int was_set_insecurely(char_u *opt, int opt_flags) uint32_t *flagp = insecure_flag(idx, opt_flags); return (*flagp & P_INSECURE) != 0; } - EMSG2(_(e_intern2), "was_set_insecurely()"); + internal_error("was_set_insecurely()"); return -1; } @@ -2317,8 +2317,8 @@ set_string_option_direct ( if (idx == -1) { // Use name. idx = findoption((const char *)name); if (idx < 0) { // Not found (should not happen). - EMSG2(_(e_intern2), "set_string_option_direct()"); - EMSG2(_("For option %s"), name); + internal_error("set_string_option_direct()"); + IEMSG2(_("For option %s"), name); return; } } @@ -5584,7 +5584,7 @@ static char_u *get_varp(vimoption_T *p) case PV_KMAP: return (char_u *)&(curbuf->b_p_keymap); case PV_SCL: return (char_u *)&(curwin->w_p_scl); case PV_WINHL: return (char_u *)&(curwin->w_p_winhl); - default: EMSG(_("E356: get_varp ERROR")); + default: IEMSG(_("E356: get_varp ERROR")); } /* always return a valid pointer to avoid a crash! */ return (char_u *)&(curbuf->b_p_wm); |