From af1540163e1e996dbe7124f6d4bf64b6c8309550 Mon Sep 17 00:00:00 2001 From: harveyshao Date: Sat, 29 Oct 2022 12:56:54 +0800 Subject: [PATCH] opt some --- frame.js | 8 +++++++- plugin/local/code/vimer.js | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/frame.js b/frame.js index 8c490301..53faed3f 100644 --- a/frame.js +++ b/frame.js @@ -99,7 +99,13 @@ Volcanos(chat.ONDAEMON, {_init: function(can, name) { if (can.user.isLocalFile) var _sub = can.core.Value(sub, chat._OUTPUTS_CURRENT); if (_sub && _sub.onaction) { return _sub.onaction && _sub.onaction._daemon({}, _sub, arg) } sub.runAction({}, arg[0], arg.slice(1)) }, - grow: function(can, msg, sub, arg) { sub.onimport._grow(sub, msg, can.page.Color(arg.join(""))) }, + grow: function(can, msg, sub, arg) { + if (sub.onimport && sub.onimport._grow) { + sub.onimport._grow(sub, msg, can.page.Color(arg.join(""))) + } if (sub.sup && sub.sup.onimport._grow) { + sub.sup.onimport._grow(sub.sup, msg, can.page.Color(arg.join(""))) + } + }, close: function(can, msg, sub) { can.user.close() }, exit: function(can, msg, sub) { can.user.close() }, }) diff --git a/plugin/local/code/vimer.js b/plugin/local/code/vimer.js index f3be3c2b..3a4a8a11 100644 --- a/plugin/local/code/vimer.js +++ b/plugin/local/code/vimer.js @@ -28,7 +28,7 @@ Volcanos(chat.ONIMPORT, {help: "导入数据", _init: function(can, msg, cb, tar Volcanos(chat.ONFIGURE, {help: "索引导航", create: function(can, target, zone, path) { can.isCmdMode()? can.onappend._action(can, can.base.Obj(can._msg.Option(ice.MSG_ACTION)).concat( - ["查找", "首页", "百度", "plan", "git"], window.webview? ["录屏", "日志", "编辑器", "浏览器"]: [], + ["查找", "首页", "百度", "plan", "git", "vim"], window.webview? ["录屏", "日志", "编辑器", "浏览器"]: [], ), target): can.onmotion.hidden(can, target.parentNode) }, recent: function(can, target, zone, path) { var total = 0