[FarGroup/FarManager] master: Refactoring (c4d709692)

0 views
Skip to first unread message

farg...@farmanager.com

unread,
May 29, 2024, 5:30:45 PMMay 29
to farco...@googlegroups.com
Repository : https://github.com/FarGroup/FarManager
On branch : master
Link : https://github.com/FarGroup/FarManager/commit/c4d709692886e7f7911ebdfa5faef1e76b052051

>---------------------------------------------------------------

commit c4d709692886e7f7911ebdfa5faef1e76b052051
Author: Shmuel Zeigerman <solo...@gmail.com>
Date: Thu May 30 00:18:36 2024 +0300

Refactoring


>---------------------------------------------------------------

c4d709692886e7f7911ebdfa5faef1e76b052051
far/changelog | 5 +++++
far/macro.cpp | 3 ---
far/vbuild.m4 | 2 +-
plugins/luamacro/_globalinfo.lua | 2 +-
plugins/luamacro/api.lua | 2 +-
plugins/luamacro/changelog | 4 ++++
plugins/luamacro/luafar/version.h | 2 +-
plugins/luamacro/utils.lua | 3 +--
8 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/far/changelog b/far/changelog
index 1be104e2c..cf75b7cb9 100644
--- a/far/changelog
+++ b/far/changelog
@@ -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

diff --git a/far/macro.cpp b/far/macro.cpp
index c660d361e..42f2537fb 100644
--- a/far/macro.cpp
+++ b/far/macro.cpp
@@ -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);
}
diff --git a/far/vbuild.m4 b/far/vbuild.m4
index 5696aeb61..700d3bbcb 100644
--- a/far/vbuild.m4
+++ b/far/vbuild.m4
@@ -1 +1 @@
-6337
+6338
diff --git a/plugins/luamacro/_globalinfo.lua b/plugins/luamacro/_globalinfo.lua
index bd15531d1..97669188f 100644
--- a/plugins/luamacro/_globalinfo.lua
+++ b/plugins/luamacro/_globalinfo.lua
@@ -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",
diff --git a/plugins/luamacro/api.lua b/plugins/luamacro/api.lua
index 848a199f0..b0658813f 100644
--- a/plugins/luamacro/api.lua
+++ b/plugins/luamacro/api.lua
@@ -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
diff --git a/plugins/luamacro/changelog b/plugins/luamacro/changelog
index ad51ded31..2b57d99e4 100644
--- a/plugins/luamacro/changelog
+++ b/plugins/luamacro/changelog
@@ -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.
diff --git a/plugins/luamacro/luafar/version.h b/plugins/luamacro/luafar/version.h
index 0a42f0562..cda480bb6 100644
--- a/plugins/luamacro/luafar/version.h
+++ b/plugins/luamacro/luafar/version.h
@@ -1,3 +1,3 @@
#include <farversion.hpp>

-#define PLUGIN_BUILD 838
+#define PLUGIN_BUILD 839
diff --git a/plugins/luamacro/utils.lua b/plugins/luamacro/utils.lua
index ca08a79fa..1b6418866 100644
--- a/plugins/luamacro/utils.lua
+++ b/plugins/luamacro/utils.lua
@@ -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
@@ -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


Reply all
Reply to author
Forward
0 new messages