From 911079e6933866eaa66f05faabf6dfa5802f7d39 Mon Sep 17 00:00:00 2001 From: uncenter <47499684+uncenter@users.noreply.github.com> Date: Fri, 15 Dec 2023 10:19:33 -0500 Subject: [PATCH] fix(yazi.toml): use i16 type to allow negative ints in offset x/y coords --- schemas/types/i16.json | 7 +++++++ schemas/yazi.json | 10 +++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 schemas/types/i16.json diff --git a/schemas/types/i16.json b/schemas/types/i16.json new file mode 100644 index 0000000..3f6fbde --- /dev/null +++ b/schemas/types/i16.json @@ -0,0 +1,7 @@ +{ + "$id": "https://yazi-rs.github.io/schemas/types/u16.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "type": "integer", + "minimum": -32768, + "maximum": 32767 +} diff --git a/schemas/yazi.json b/schemas/yazi.json index a61cebf..9129dd3 100644 --- a/schemas/yazi.json +++ b/schemas/yazi.json @@ -255,9 +255,13 @@ }, "offset": { "type": "array", - "items": { - "$ref": "/schemas/types/u16.json" - }, + "items": false, + "prefixItems": [ + { "$ref": "/schemas/types/i16.json" }, + { "$ref": "/schemas/types/i16.json" }, + { "$ref": "/schemas/types/u16.json" }, + { "$ref": "/schemas/types/u16.json" } + ], "minItems": 4, "maxItems": 4 }