FarCmd110625.diff (1,844 bytes)
Index: FARCmds.cpp
===================================================================
--- FARCmds.cpp (revision 6355)
+++ FARCmds.cpp (working copy)
@@ -80,6 +80,7 @@
{
Info.PanelControl(PANEL_ACTIVE,FCTL_GETPANELINFO,0,&PInfo);
fullcmd[0]=cmd[0]=selectItem[0]=L'\0';
+ HANDLE _PANEL_HANDLE = PANEL_ACTIVE;
if (OInfo->OpenFrom==OPEN_COMMANDLINE)
{
@@ -106,6 +107,7 @@
lstrcat(selectItem,PPI->FileName);
free(PPI);
}
+ _PANEL_HANDLE=PANEL_PASSIVE;
}
/*��������� ������ �� �����*/
@@ -127,22 +129,22 @@
FSF.Unquote(Dir);
if (*Dir)
- Info.PanelControl(PANEL_PASSIVE,FCTL_SETPANELDIR,0,&Dir);
+ Info.PanelControl(_PANEL_HANDLE,FCTL_SETPANELDIR,0,&Dir);
- Info.PanelControl(PANEL_PASSIVE,FCTL_GETPANELINFO,0,&PInfo);
+ Info.PanelControl(_PANEL_HANDLE,FCTL_GETPANELINFO,0,&PInfo);
PRI.CurrentItem=PInfo.CurrentItem;
PRI.TopPanelItem=PInfo.TopPanelItem;
for (int J=0; J < PInfo.ItemsNumber; J++)
{
bool Equal=false;
- size_t Size = Info.PanelControl(PANEL_PASSIVE,FCTL_GETPANELITEM,J,0);
+ size_t Size = Info.PanelControl(_PANEL_HANDLE,FCTL_GETPANELITEM,J,0);
PluginPanelItem* PPI=(PluginPanelItem*)malloc(Size);
if (PPI)
{
FarGetPluginPanelItem gpi={Size, PPI};
- Info.PanelControl(PANEL_PASSIVE,FCTL_GETPANELITEM,J,&gpi);
+ Info.PanelControl(_PANEL_HANDLE,FCTL_GETPANELITEM,J,&gpi);
Equal=!FSF.LStricmp(Name,FSF.PointToName(PPI->FileName));
free(PPI);
}
@@ -155,11 +157,11 @@
}
}
- Info.PanelControl(PANEL_PASSIVE,FCTL_REDRAWPANEL,0,&PRI);
+ Info.PanelControl(_PANEL_HANDLE,FCTL_REDRAWPANEL,0,&PRI);
}
else
{
- Info.PanelControl(PANEL_PASSIVE,FCTL_REDRAWPANEL,0,0);
+ Info.PanelControl(_PANEL_HANDLE,FCTL_REDRAWPANEL,0,0);
}
return INVALID_HANDLE_VALUE;