diff src/json.c @ 21461:4dfd00f481fb v8.2.1281

patch 8.2.1281: the "trailing characters" error can be hard to understand Commit: https://github.com/vim/vim/commit/2d06bfde29bd3a62fc85823d2aa719ef943bd319 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jul 23 17:16:18 2020 +0200 patch 8.2.1281: the "trailing characters" error can be hard to understand Problem: The "trailing characters" error can be hard to understand. Solution: Add the trailing characters to the message.
author Bram Moolenaar <Bram@vim.org>
date Thu, 23 Jul 2020 17:30:03 +0200
parents c14e628cd4bb
children 650070143c56
line wrap: on
line diff
--- a/src/json.c
+++ b/src/json.c
@@ -1086,7 +1086,7 @@ json_decode_all(js_read_T *reader, typva
     json_skip_white(reader);
     if (reader->js_buf[reader->js_used] != NUL)
     {
-	emsg(_(e_trailing));
+	semsg(_(e_trailing_arg), reader->js_buf + reader->js_used);
 	return FAIL;
     }
     return OK;