Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuz committed May 29, 2024
1 parent 19fbebf commit c4d7096
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
5 changes: 5 additions & 0 deletions far/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
--------------------------------------------------------------------------------
shmuel 2024-05-30 00:16:16+03:00 - build 6338

1. Refactoring.

--------------------------------------------------------------------------------
drkns 2024-05-29 17:32:47+01:00 - build 6337

Expand Down
3 changes: 0 additions & 3 deletions far/macro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2235,9 +2235,6 @@ void KeyMacro::CallFar(intptr_t CheckCode, FarMacroCall* Data)
case MCODE_F_GETOPTIONS:
{
DWORD Options = 0;
if (Global->OnlyEditorViewerUsed) Options |= 0_bit;
if (Global->Opt->Macro.DisableMacro&MDOL_ALL) Options |= 2_bit;
if (Global->Opt->Macro.DisableMacro&MDOL_AUTOSTART) Options |= 3_bit;
if (Global->Opt->ReadOnlyConfig) Options |= 4_bit;
return api.PassValue(Options);
}
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6337
6338
2 changes: 1 addition & 1 deletion plugins/luamacro/_globalinfo.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function export.GetGlobalInfo()
return {
Version = { 3, 0, 0, 838 },
Version = { 3, 0, 0, 839 },
MinFarVersion = { 3, 0, 0, 6327 },
Guid = win.Uuid("4EBBEFC8-2084-4B7F-94C0-692CE136894D"),
Title = "LuaMacro",
Expand Down
2 changes: 1 addition & 1 deletion plugins/luamacro/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ mf.iif = function(Expr, res1, res2)
end

mf.usermenu = function(mode, filename)
if Shared.OnlyEditorViewerUsed then return end -- mantis #2986 (crash)
if not panel.CheckPanelsExist() then return end -- mantis #2986 (crash)
if mode and type(mode)~="number" then return end
mode = mode or 0
local sync_call = band(mode,0x100) ~= 0
Expand Down
4 changes: 4 additions & 0 deletions plugins/luamacro/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
shmuel 2024-05-30 00:17:44+03:00 - build 839

1. Refactoring.

shmuel 2024-05-26 14:45:02+03:00 - build 838

1. Fix the last commit.
Expand Down
2 changes: 1 addition & 1 deletion plugins/luamacro/luafar/version.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include <farversion.hpp>

#define PLUGIN_BUILD 838
#define PLUGIN_BUILD 839
3 changes: 1 addition & 2 deletions plugins/luamacro/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ local MCODE_F_CHECKALL = 0x80C64
local MCODE_F_GETOPTIONS = 0x80C65
local MCODE_F_MACROSETTINGS = 0x80C6A

Shared.OnlyEditorViewerUsed = band(MacroCallFar(MCODE_F_GETOPTIONS),0x3) ~= 0
local ReadOnlyConfig = band(MacroCallFar(MCODE_F_GETOPTIONS),0x10) ~= 0

local Areas
Expand Down Expand Up @@ -724,7 +723,7 @@ local function LoadMacros (unload, paths)
ContentColumns = {}
if Shared.panelsort then Shared.panelsort.DeleteSortModes() end

local AreaNames = Shared.OnlyEditorViewerUsed and SomeAreaNames or AllAreaNames
local AreaNames = panel.CheckPanelsExist() and AllAreaNames or SomeAreaNames
for _,name in pairs(AreaNames) do newAreas[name]={} end
for _,name in ipairs(EventGroups) do Events[name]={} end
for k in pairs(package.loaded) do
Expand Down

0 comments on commit c4d7096

Please sign in to comment.