aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/message.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-05-07 03:24:01 +0200
committerJustin M. Keyes <justinkz@gmail.com>2018-05-09 23:18:38 +0200
commitc9f3174075a7168f10fabf806891ef59ee3b13d4 (patch)
tree67adda606732fdcfa746852a685c183bc11037a1 /src/nvim/message.c
parent33bfea31b0cd630f6494cf91d06c807f03d29a85 (diff)
downloadrneovim-c9f3174075a7168f10fabf806891ef59ee3b13d4.tar.gz
rneovim-c9f3174075a7168f10fabf806891ef59ee3b13d4.tar.bz2
rneovim-c9f3174075a7168f10fabf806891ef59ee3b13d4.zip
API: return non-generic VimL errors
- Return VimL errors instead of generic errors for: - nvim_call_function - nvim_call_dict_function - Fix tests which were silently broken before this change. This violates #6150 where we agreed not to translate API errors. But that can be fixed later.
Diffstat (limited to 'src/nvim/message.c')
-rw-r--r--src/nvim/message.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 7ca82c2878..bcfff90d7d 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -67,6 +67,7 @@ static char_u *confirm_msg_tail; /* tail of confirm_msg */
MessageHistoryEntry *first_msg_hist = NULL;
MessageHistoryEntry *last_msg_hist = NULL;
+char *msg_first_ignored_err = NULL;
static int msg_hist_len = 0;
static FILE *verbose_fd = NULL;
@@ -504,6 +505,9 @@ int emsg(const char_u *s_)
if (cause_errthrow((char_u *)s, severe, &ignore) == true) {
if (!ignore) {
did_emsg = true;
+ if (msg_first_ignored_err == NULL) {
+ msg_first_ignored_err = xstrdup(s);
+ }
}
return true;
}