From 715411061b18679a81ee749c856a76bdf2871fca Mon Sep 17 00:00:00 2001 From: Guldoman Date: Mon, 24 Oct 2022 04:47:26 +0200 Subject: [PATCH] Apply `doc` commands to anything that extends `DocView` This fixes a regression caused by cf29a6a45f190c85ed3423a883307c3b9251e2d3. --- data/core/commands/doc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/core/commands/doc.lua b/data/core/commands/doc.lua index 365c0d1..3ddb7f1 100644 --- a/data/core/commands/doc.lua +++ b/data/core/commands/doc.lua @@ -538,7 +538,7 @@ local commands = { } command.add(function(x, y) - if x == nil or y == nil or not core.active_view:is(DocView) then return false end + if x == nil or y == nil or not core.active_view:extends(DocView) then return false end local dv = core.active_view local x1,y1,x2,y2 = dv.position.x, dv.position.y, dv.position.x + dv.size.x, dv.position.y + dv.size.y return x >= x1 + dv:get_gutter_width() and x < x2 and y >= y1 and y < y2, dv, x, y