From 26e47f7583dfb753f365005b67e381b0fba0f1ea Mon Sep 17 00:00:00 2001 From: jgmdev Date: Sun, 15 May 2022 17:17:28 -0400 Subject: [PATCH] plugin contextmenu: simplify predicate --- data/plugins/contextmenu.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data/plugins/contextmenu.lua b/data/plugins/contextmenu.lua index ac811b2a..918c6417 100644 --- a/data/plugins/contextmenu.lua +++ b/data/plugins/contextmenu.lua @@ -3,7 +3,6 @@ local core = require "core" local command = require "core.command" local keymap = require "core.keymap" local ContextMenu = require "core.contextmenu" -local DocView = require "core.docview" local RootView = require "core.rootview" local menu = ContextMenu() @@ -33,7 +32,7 @@ function RootView:draw(...) menu:draw() end -command.add(function() return getmetatable(core.active_view) == DocView end, { +command.add("core.docview!", { ["context:show"] = function() menu:show(core.active_view.position.x, core.active_view.position.y) end