Skip to content
Permalink
Browse files

using FCTL_GETUSERSCREEN to work correctly in Far 3 & SetStdHande fix

  • Loading branch information...
alabuzhev committed May 17, 2016
1 parent 2f00dab commit 158470378d70f3e2c6f3bcd9fd58c0728eb78df9
Showing with 13 additions and 27 deletions.
  1. +6 −26 plugins/multiarc/ArcMix.cpp
  2. +6 −0 plugins/multiarc/changelog
  3. +1 −1 plugins/multiarc/multiarcversion.hpp
@@ -139,9 +139,6 @@ int Execute(HANDLE hPlugin,char *CmdStr,int HideOutput,int Silent,int ShowTitle,

if (CreatePipe(&hChildStdoutRd, &hChildStdoutWr, &saAttr, 32768))
{
SetStdHandle(STD_OUTPUT_HANDLE,hChildStdoutWr);
SetStdHandle(STD_ERROR_HANDLE,hChildStdoutWr);

if (Silent)
{
/*hScreen=Info.SaveScreen(0,0,-1,0);
@@ -154,24 +151,18 @@ int Execute(HANDLE hPlugin,char *CmdStr,int HideOutput,int Silent,int ShowTitle,
Info.Message(Info.ModuleNumber,0,NULL,MsgItems,
ARRAYSIZE(MsgItems),0);
}
SetStdHandle(STD_OUTPUT_HANDLE,hChildStdoutWr);
SetStdHandle(STD_ERROR_HANDLE,hChildStdoutWr);
}
else
HideOutput=FALSE;
}
else
{
GetConsoleScreenBufferInfo(StdOutput,&csbi);

char Blank[1024];
FSF.sprintf(Blank,"%*s",csbi.dwSize.X,"");
for (int Y=0;Y<csbi.dwSize.Y;Y++)
Info.Text(0,Y,LIGHTGRAY,Blank);
Info.Text(0,0,0,NULL);

COORD C;
C.X=0;
C.Y=csbi.dwCursorPosition.Y;
SetConsoleCursorPosition(StdOutput,C);
Info.Control(hPlugin, FCTL_GETUSERSCREEN, NULL);
GetConsoleScreenBufferInfo(StdOutput, &csbi);
COORD C = { 0, csbi.dwCursorPosition.Y };
SetConsoleCursorPosition(StdOutput, C);
}


@@ -263,17 +254,6 @@ int Execute(HANDLE hPlugin,char *CmdStr,int HideOutput,int Silent,int ShowTitle,
SetConsoleMode(StdInput,ConsoleMode);
if (!HideOutput)
{
SMALL_RECT src;
COORD dest;
CHAR_INFO fill;
src.Left=0;
src.Top=2;
src.Right=csbi.dwSize.X;
src.Bottom=csbi.dwSize.Y;
dest.X=dest.Y=0;
fill.Char.AsciiChar=' ';
fill.Attributes=7;
ScrollConsoleScreenBuffer(StdOutput,&src,NULL,dest,&fill);
Info.Control(hPlugin,FCTL_SETUSERSCREEN,NULL);
}
if (hScreen)
@@ -1,3 +1,9 @@
drkns 17.05.2016 12:54:55 +0200 - build 197

1. ���������� FCTL_GETUSERSCREEN ��� ���������� ������ � Far 3.

2. SetStdHandle ���������� ������, ��� �����, ��� ������ ����� ���������.

svs 14.05.2014 20:03:02 +0400 - build

1. Add arcspa.lng
@@ -2,7 +2,7 @@
#define __MULTIARCVERSION_HPP__
#include "farversion.hpp"

#define MA_BUILD 196
#define MA_BUILD 197
#define MAPRODUCTNAME "MultiArc"
#define FMTDESCRIPTION "Second-level plugin module for MultiArc Far Manager plugin"

0 comments on commit 1584703

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