From 610be92a8b6db8882051948b5a0992248f3dd662 Mon Sep 17 00:00:00 2001 From: Xinhao Yuan Date: Sun, 11 Aug 2019 09:08:52 -0400 Subject: [PATCH] command --- README.md | 6 +++--- editor.lua | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e5972d1..d11f893 100644 --- a/README.md +++ b/README.md @@ -67,15 +67,15 @@ There are three kinds of operations: 1. Operations taking argument string and parsed as multiple numbers. - `h` (horizontally split), `v` (vertically split), `w` (grid split), `d` (draft split) + `h` horizontally split, `v` vertically split, `w` grid split, `d` draft split 2. Operations taking argument string as a single number. - `s` (shifting active region), `p` (setting the maximum split depth) + `s` shifting active region, `p` setting the maximum split depth 3. Operation not taking argument. - `.` (Finish all regions), `-` (Finish the current region), `;` (No-op) + `.` finish all regions, `-` finish the current region, `/` remove the current region, `;` no-op Argument string are composed of numbers and `,`. If the string contains `,`, it will be used to split argument into multiple numbers. Otherwise, each digit in the string will be treated as a separated number in type 1 ops. diff --git a/editor.lua b/editor.lua index e68f23d..8eff40f 100644 --- a/editor.lua +++ b/editor.lua @@ -554,6 +554,10 @@ local function create(data) push_area() end + elseif method == "/" then + + pop_open_area() + elseif method == ";" then -- nothing @@ -581,6 +585,7 @@ local function create(data) ["t"] = 2, ["T"] = 2, ["-"] = 1, ["."] = 1, + ["/"] = 1, [";"] = 1, ["0"] = 0, ["1"] = 0, ["2"] = 0, ["3"] = 0, ["4"] = 0, ["5"] = 0, ["6"] = 0, ["7"] = 0, ["8"] = 0, ["9"] = 0,