From faa1fc3dd37201c33e7445707ecef488a5119b18 Mon Sep 17 00:00:00 2001 From: shylinux Date: Sun, 2 Oct 2022 20:36:19 +0800 Subject: [PATCH] opt some --- plugin/local/code/vimer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/local/code/vimer.js b/plugin/local/code/vimer.js index 2374fcb4..d6b17f22 100644 --- a/plugin/local/code/vimer.js +++ b/plugin/local/code/vimer.js @@ -392,7 +392,8 @@ Volcanos(chat.ONACTION, {help: "控件交互", }, _selectLine: function(event, can) { if (!can.current) { return } can.page.Select(can, can.current.line, "td.text", function(td) { var target = can.ui.current; target.value = td.innerText - can.current.line.appendChild(target), can.page.style(can, target, html.LEFT, td.offsetLeft-1, html.WIDTH, can.ui.content.style.width) + can.current.line.appendChild(target), can.page.style(can, target, + html.LEFT, td.offsetLeft-1, html.WIDTH, can.base.Max(can.ui.content.style.width, td.offsetWidth)) if (event && event.type) { if (event.type == "click" && can.mode != "insert") { can.onkeymap._insert(event, can) can.onmotion.delay(can, function() { can.onaction._complete(event, can) }) @@ -435,7 +436,7 @@ Volcanos(chat.ONACTION, {help: "控件交互", }) Volcanos(chat.ONEXPORT, {help: "导出数据", list: ["文件数", "模式", "解析器", "文件名", "当前行", "跳转数"]}) Volcanos(chat.ONPLUGIN, {help: "注册插件", - "can.code.vimer.keymap": shy("按键", {}, ["mode", "key", ice.LIST, ice.BACK], function(can, msg, cmds) { + "code.vimer.keymap": shy("按键", {}, ["mode", "key", ice.LIST, ice.BACK], function(can, msg, cmds) { can.core.Item(can.onkeymap._mode, function(mode, value) { (!cmds[0] || cmds[0] == mode) && can.core.Item(value, function(key, func) { if (cmds[0] == mode && cmds[1] == key) {