Skip to content

Commit 83381f7

Browse files
committed
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)
1 parent 9be7c04 commit 83381f7

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/json.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ json_decode_item(js_read_T *reader, typval_T *res, int options)
936936
&& dict_find(top_item->jd_tv.vval.v_dict,
937937
top_item->jd_key, -1) != NULL)
938938
{
939-
EMSG2(_("E937: Duplicate key in JSON: \"%s\""),
939+
EMSG2(_("E938: Duplicate key in JSON: \"%s\""),
940940
top_item->jd_key);
941941
clear_tv(&top_item->jd_key_tv);
942942
clear_tv(cur_item);

src/testdir/test_json.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ func Test_json_decode()
152152
call assert_fails('call json_decode("blah")', "E474:")
153153
call assert_fails('call json_decode("true blah")', "E488:")
154154
call assert_fails('call json_decode("<foobar>")', "E474:")
155-
call assert_fails('call json_decode("{\"a\":1,\"a\":2}")', "E937:")
155+
call assert_fails('call json_decode("{\"a\":1,\"a\":2}")', "E938:")
156156

157157
call assert_fails('call json_decode("{")', "E474:")
158158
call assert_fails('call json_decode("{foobar}")', "E474:")

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
180,
767769
/**/
768770
179,
769771
/**/

0 commit comments

Comments
 (0)