Skip to content

Commit

Permalink
Don't run the command started by Shift-Enter from Far Manager via Con…
Browse files Browse the repository at this point in the history
…EmuC.exe.

  If one needs the command to be started in new ConEmu tab,
  than install the Macro: `ConEmu/Far3_lua/ConEmu.ShiftEnter.lua`.
  • Loading branch information
Maximus5 committed Apr 1, 2016
1 parent 6e21172 commit dd71baa
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/ConEmuHk/ShellProcessor.cpp
Expand Up @@ -2229,20 +2229,23 @@ int CShellProc::PrepareExecuteParms(
}
else
{
bGoChangeParm = ((bLongConsoleOutput)
|| (lbGuiApp && (NewConsoleFlags || bForceNewConsole)) // хотят GUI прицепить к новой вкладке в ConEmu, или новую консоль из GUI
// eCreateProcess перехватывать не нужно (сами сделаем InjectHooks после CreateProcess)
|| ((mn_ImageBits != 16) && (m_SrvMapping.bUseInjects & 1)
&& (NewConsoleFlags
|| (bLongConsoleOutput && (aCmd == eShellExecute))
// хотят GUI прицепить к новой вкладке в ConEmu, или новую консоль из GUI
if (lbGuiApp && (NewConsoleFlags || bForceNewConsole))
bGoChangeParm = true;
// eCreateProcess перехватывать не нужно (сами сделаем InjectHooks после CreateProcess)
else if ((mn_ImageBits != 16) && (m_SrvMapping.bUseInjects & 1)
&& (NewConsoleFlags // CEF_NEWCON_SWITCH | CEF_NEWCON_PREPEND
|| (bLongConsoleOutput && (aCmd == eShellExecute) && (anShellFlags && (*anShellFlags & SEE_MASK_NO_CONSOLE)) && (anShowCmd && *anShowCmd))
|| (bCurConsoleArg && (m_Args.LongOutputDisable != crb_On))
#ifdef _DEBUG
|| lbAlwaysAddConEmuC
#endif
))
// если это Дос-приложение - то если включен DosBox, вставляем ConEmuC.exe /DOSBOX
|| ((mn_ImageBits == 16) && (mn_ImageSubsystem == IMAGE_SUBSYSTEM_DOS_EXECUTABLE)
&& m_SrvMapping.cbSize && (m_SrvMapping.Flags & CECF_DosBox)));
bGoChangeParm = true;
// если это Дос-приложение - то если включен DosBox, вставляем ConEmuC.exe /DOSBOX
else if ((mn_ImageBits == 16) && (mn_ImageSubsystem == IMAGE_SUBSYSTEM_DOS_EXECUTABLE)
&& m_SrvMapping.cbSize && (m_SrvMapping.Flags & CECF_DosBox))
bGoChangeParm = true;
}

if (bGoChangeParm)
Expand Down

0 comments on commit dd71baa

Please sign in to comment.