diff --git a/editor.lua b/editor.lua index 724c942..ac1931d 100644 --- a/editor.lua +++ b/editor.lua @@ -651,7 +651,7 @@ local function create(data) end -- bring the current cmd to the front data.cmds[#data.cmds + 1] = current_cmd - data.last_cmd[layout.machi_instance_name] = current_cmd + data.last_cmd[layout.machi_get_instance_name(screen)] = current_cmd if data.history_file then local file, err = io.open(data.history_file, "w") diff --git a/layout.lua b/layout.lua index 5ec8a20..d84be9a 100644 --- a/layout.lua +++ b/layout.lua @@ -52,6 +52,10 @@ local function create(name, editor) regions_cache = {} } + local function get_instance_name(_screen) + return name + end + local function get_regions(workarea, _screen) if priv.cmd == nil then return {} end local key = tostring(workarea.width) .. "x" .. tostring(workarea.height) .. "+" .. tostring(workarea.x) .. "+" .. tostring(workarea.y) @@ -140,7 +144,7 @@ local function create(name, editor) name = "machi", arrange = arrange, resize_handler = resize_handler, - machi_instance_name = name, + machi_get_instance_name = get_instance_name, machi_set_cmd = set_cmd, machi_get_regions = get_regions, }