Apply `doc` commands to anything that extends `DocView`
This fixes a regression caused by
cf29a6a45f
.
This commit is contained in:
parent
76f55aefe8
commit
715411061b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue