Skip to content

Commit

Permalink
LuaFAR: fix handling PPIF_SELECTED.
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuz committed Feb 12, 2016
1 parent 2c2fede commit bf2f4f9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion plugins/luamacro/_globalinfo.lua
@@ -1,6 +1,6 @@
function export.GetGlobalInfo()
return {
Version = { 1, 0, 0, 555 },
Version = { 1, 0, 0, 556 },
MinFarVersion = { 3, 0, 0, 4450 },
Guid = win.Uuid("4EBBEFC8-2084-4B7F-94C0-692CE136894D"),
Title = "LuaMacro",
Expand Down
6 changes: 5 additions & 1 deletion plugins/luamacro/changelog
@@ -1,4 +1,8 @@
shmuel 08.02.2016 23:14:30 +0200 - build 555
shmuel 12.02.2016 12:41:32 +0200 - build 556

1. LuaFAR: fix handling PPIF_SELECTED.

shmuel 08.02.2016 23:14:30 +0200 - build 555

1. M#3175: "Отключить в LuaMacro редирект WOW64 для функций работы с реестром"
LuaFAR: Во все функции работы с реестром, кроме win.DeleteRegKey, добавлен параметр "AccessMask".
Expand Down
12 changes: 4 additions & 8 deletions plugins/luamacro/luafar/exported.c
Expand Up @@ -367,16 +367,12 @@ void UpdateFileSelection(lua_State* L, struct PluginPanelItem *PanelItem,
{
lua_getfield(L,-1,"Flags"); //+2

if(lua_istable(L,-1))
if(lua_toboolean(L,-1))
{
lua_getfield(L,-1,"selected"); //+3

if(lua_toboolean(L,-1))
PanelItem[i].Flags |= PPIF_SELECTED;
else
int success = 0;
UINT64 Flags = GetFlagCombination(L,-1,&success);
if(success && ((Flags & PPIF_SELECTED) == 0))
PanelItem[i].Flags &= ~PPIF_SELECTED;

lua_pop(L,1); //+2
}

lua_pop(L,1); //+1
Expand Down
2 changes: 1 addition & 1 deletion plugins/luamacro/luamacro.rc
@@ -1,6 +1,6 @@
#include <farversion.hpp>

#define PLUGIN_BUILD 555
#define PLUGIN_BUILD 556
#define PLUGIN_DESC "Lua Macros for Far Manager"
#define PLUGIN_NAME "LuaMacro"
#define PLUGIN_FILENAME "luamacro.dll"
Expand Down

0 comments on commit bf2f4f9

Please sign in to comment.