Code: Select all
local HideOnly = true --hide or remove
local F = far.Flags
Event {
description="Remove date separators from history lists";
group="DialogEvent";
uid="95525607-A291-48C2-8110-FA9150AF7A7E";
condition=function(Event,param)
return Event==F.DE_DLGPROCINIT
and F.DN_INITDIALOG
end;
action=function(Event,param)
local hDlg = param.hDlg
local Item = hDlg:send(F.DM_GETDLGITEM,1)
if Item and Item[1]==F.DI_LISTBOX then
local list = Item[6]
for i=#list,1,-1 do
local v = list[i]
if bit64.band(v.Flags,F.LIF_SEPARATOR)~=0 then
if HideOnly then
v.Index = i
v.Flags = bit64.bor(v.Flags,F.LIF_HIDDEN)
hDlg:send(F.DM_LISTUPDATE,1,v)
else --Remove
hDlg:send(F.DM_LISTDELETE,1,{StartIndex=i,Count=1})
end
end
end
end
end
}