---[[
local function FilterOn()
Keys('CtrlAltF')
end
local OldVers = ({far.AdvControl("ACTL_GETFARMANAGERVERSION", true)})[4] <= 5784
local function colorer(cmd, args)
if args.FilterOn then mf.postmacro(FilterOn) end
if not args[1] then
Plugin.Menu("D2F36B62-A470-418d-83A3-ED7A3710E5B5")
else
if OldVers then
Plugin.Call("D2F36B62-A470-418d-83A3-ED7A3710E5B5",cmd) --Colorer
else
Plugin.Call("D2F36B62-A470-418d-83A3-ED7A3710E5B5", unpack(args))
end
end
end
local bindings = {
{0, "C", "Colorer menu" , "0FFFD4E5-B496-4D10-8B23-8D891106CCB0", {} };
{1, "L", "List types" , "5C2F48E8-48A4-4BD0-9BEE-65B6CC5C7E16", {"Types","Menu", FilterOn=true} };
{2, "[", "Match pair" , "87FF64FE-D640-4234-BC53-8E869506794B", {'Brackets', 'Match'} };
{3, "]", "Select block" , "61F7C1C5-E439-4F7A-A088-4D3E09B6CB9F", {'Brackets', 'SelectAll'} };
{4, "P", "Select pair" , "020E0C9B-BA0F-423A-9B0B-BFEA8B91F16B", {'Brackets', 'SelectIn'} };
{5, ",", "Outliner list" , "F41B60B5-1594-4F3C-BD09-D54F27E4485C", {'Functions','Show', FilterOn=true} };
{6, "'", "Errors list" , "FB403B6F-9981-483A-B978-8DF68EC75745", {'Errors', 'Show', FilterOn=true} };
{7, "K", "Select region" , "4B4D3931-8182-4659-B915-8B609ED48346", {'Region', 'Select'} };
{8, "A", "Region info" , "74190CEC-A8C8-4BC3-82C7-64D49D45B298", {'Region', 'Show'} };
{9, "O", "Find Function" , "97B174CC-0735-4032-82E2-594174DDD14A", {'Functions', 'Find'} };
{11,"U", "Update highlighting" , "8D4CC644-2FE0-4155-A0B6-93C300E3C618", {'Editor', 'Refresh'} };
{12,"R", "Reload schema library", "8F223079-EC1F-492A-8B8E-E4DDD724CACA", {'Settings', 'Reload'} };
{13,"ShiftC", "Configure" , "284C8858-6916-478C-AC6F-DD56B4174F34", {'Settings', 'Menu'} };
{14,"X", "Toggle colorer" , "" , {'Editor','Status', false}};
{15,"=", "CrossVisible off" , "" , {'Editor','CrossVisible', 0}};
}
for _,v in ipairs(bindings) do
local cmd,hk,descr,uid, args = unpack(v)
Macro {
description=("%-6s %s"):format(hk,descr);
area="Editor"; key="AltC-"..hk;
uid=uid;
action=function()
----[[*D*]]win.OutputDebugString('BAX.Alt-C-colorer.40: cmd='..tostring(cmd)..'; args='..tostring(args))
if OldVers and cmd==1 then
mf.postmacro(FilterOn)
end
if cmd == 14 then
if OldVers then
return
else
args[#args] = not Plugin.Call("D2F36B62-A470-418d-83A3-ED7A3710E5B5", 'Editor','Status')
end
end -- if cmd == 14
colorer(cmd, args)
end;
}
end
--]]