Mercurial > vim
changeset 10581:dffda1f9b501 v8.0.0180
patch 8.0.0180: error E937 is used twice
commit https://github.com/vim/vim/commit/83381f7129aca00bc2dd24527f160bc6a60d70af
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 14 14:36:08 2017 +0100
patch 8.0.0180: error E937 is used twice
Problem: Error E937 is used both for duplicate key in JSON and for trying
to delete a buffer that is in use.
Solution: Rename the JSON error to E938. (Norio Takagi, closes #1376)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 14 Jan 2017 14:45:04 +0100 |
parents | 1948f216f40d |
children | 7153b84f4542 |
files | src/json.c src/testdir/test_json.vim src/version.c |
diffstat | 3 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/json.c +++ b/src/json.c @@ -936,7 +936,7 @@ item_end: && dict_find(top_item->jd_tv.vval.v_dict, top_item->jd_key, -1) != NULL) { - EMSG2(_("E937: Duplicate key in JSON: \"%s\""), + EMSG2(_("E938: Duplicate key in JSON: \"%s\""), top_item->jd_key); clear_tv(&top_item->jd_key_tv); clear_tv(cur_item);
--- a/src/testdir/test_json.vim +++ b/src/testdir/test_json.vim @@ -152,7 +152,7 @@ func Test_json_decode() call assert_fails('call json_decode("blah")', "E474:") call assert_fails('call json_decode("true blah")', "E488:") call assert_fails('call json_decode("<foobar>")', "E474:") - call assert_fails('call json_decode("{\"a\":1,\"a\":2}")', "E937:") + call assert_fails('call json_decode("{\"a\":1,\"a\":2}")', "E938:") call assert_fails('call json_decode("{")', "E474:") call assert_fails('call json_decode("{foobar}")', "E474:")