Skip to content
Permalink
Browse files

Рефакторинг.

  • Loading branch information...
shmuz committed Jan 21, 2015
1 parent c358404 commit a97ac008b233bdec183d3574f14337bf67d6a15b
@@ -1,4 +1,8 @@
shmuel 21.01.2015 16:51:57 +0200 - build 4251
shmuel 21.01.2015 23:58:16 +0200 - build 4252

1. Рефакторинг.

shmuel 21.01.2015 16:51:57 +0200 - build 4251

1. Рефакторинг.

@@ -467,10 +467,10 @@ static bool IsTopMacroOutputDisabled()
return MacroPluginOp(5.0,false,&Ret) ? !!Ret.ReturnType : false;
}

static inline bool IsMacroQueueEmpty()
static inline bool IsPostMacroEnabled()
{
MacroPluginReturn Ret;
return !MacroPluginOp(6.0,false,&Ret) || Ret.ReturnType==1;
return MacroPluginOp(6.0,false,&Ret) && Ret.ReturnType==1;
}

static void SetMacroValue(const FarMacroValue& Value)
@@ -682,7 +682,7 @@ int KeyMacro::ProcessEvent(const FAR_INPUT_RECORD *Rec)
}
else
{
if (!m_WaitKey && (!IsExecuting() || IsMacroQueueEmpty()))
if (!m_WaitKey && IsPostMacroEnabled())
{
DWORD key = Rec->IntKey;
if ((key&0x00FFFFFF) > 0x7F && (key&0x00FFFFFF) < 0xFFFF)
@@ -1 +1 @@
m4_define(BUILD,4251)m4_dnl
m4_define(BUILD,4252)m4_dnl
@@ -1,7 +1,7 @@
function export.GetGlobalInfo()
return {
Version = { 1, 0, 0, 476 },
MinFarVersion = { 3, 0, 0, 4251 },
Version = { 1, 0, 0, 477 },
MinFarVersion = { 3, 0, 0, 4252 },
Guid = win.Uuid("4EBBEFC8-2084-4B7F-94C0-692CE136894D"),
Title = "LuaMacro",
Description = "Far macros in Lua",
@@ -1,4 +1,8 @@
shmuel 21.01.2015 16:51:11 +0200 - build 476
shmuel 21.01.2015 23:59:12 +0200 - build 477

1. Рефакторинг.

shmuel 21.01.2015 16:51:11 +0200 - build 476

1. Рефакторинг.

@@ -419,7 +419,7 @@ local OP_ISDISABLEOUTPUT = 2
local OP_HISTORYDISABLEMASK = 3
local OP_ISHISTORYDISABLE = 4
local OP_ISTOPMACROOUTPUTDISABLED = 5
local OP_ISMACROQUEUEEMPTY = 6
local OP_ISPOSTMACROENABLED = 6
local OP_POSTNEWMACRO = 7
local OP_SETMACROVALUE = 8
local OP_GETINPUTFROMMACRO = 9
@@ -442,8 +442,8 @@ function KeyMacro.Dispatch (opcode, ...)
elseif opcode==OP_ISTOPMACROOUTPUTDISABLED then
local mr = GetTopMacro()
return mr and 0==band(mr:GetFlags(),MFLAGS_ENABLEOUTPUT) and 1 or 0
elseif opcode == OP_ISMACROQUEUEEMPTY then
return GetCurMacro() and 0 or 1
elseif opcode == OP_ISPOSTMACROENABLED then
return not (IsExecuting() and GetCurMacro()) and 1 or 0
elseif opcode == OP_POSTNEWMACRO then -- from API MacroControl(MSSC_POST)
local Lang,Code,Flags,AKey = ...
local f1,f2 = loadmacro(Lang,Code)
@@ -1,6 +1,6 @@
#include <farversion.hpp>

#define PLUGIN_BUILD 476
#define PLUGIN_BUILD 477
#define PLUGIN_DESC "Lua Macros for Far Manager"
#define PLUGIN_NAME "LuaMacro"
#define PLUGIN_FILENAME "luamacro.dll"

0 comments on commit a97ac00

Please sign in to comment.
You can’t perform that action at this time.